Blog test work, made on Laravel 5.4
-
Setting up
- run:
git clone https://github.com/McSneaky/larablog
- run:
composer install
- rename .env.example to .env and configure database, url, debug level etc
- run:
php artisan migrate
- run:
-
Database seeding with test data
- run:
php artisan db:seed --class=RolesTableSeeder
Populates roles - run:
php artisan db:seed --class=UsersTableSeeder
Generates 10 random users including administrator and moderator (see below) - run:
php artisan db:seed --class=PostsTableSeeder
Generates 50 random posts to random users - To generate more 10 users run:
php artisan db:seed --class=UsersTableSeeder
Or go into database/seeds/UsersTableSeeder and increase $users count for custom ammount of users - To generate more 50 posts run:
php artisan db:seed --class=PostsTableSeeder
Or go into database/seeds/PostsTableSeeder and increase $posts count for custom ammount of posts
- run:
-
Database seeding without test data
- run:
php artisan db:seed --class=RolesTableSeeder
- run:
-
Work with CSS and JS
-
run:
npm install
-
run:
npm run prod
ORnpm run dev
depending on environment
After seeding users table administrator and moderator users are created.
Admin details:
- name: admin
- email: [email protected]
- password: admin
Moderator details:
- name: modem
- email: [email protected]
- password: modem
Moderator rights:
- Edit posts
- Delete posts
- Delete images
Admin rights:
- Change users name
- Change users email
- Delete users
- +All Moderator rights
English and estonian languages are supported www.larablog.dev and www.larablog.dev/et (no prefix for english and /et prefix for estonian)
- Document root should be in larablog/public
- AppServiceProvider -> Schema default string length is limited to 191 to support older databases.
- If images uploaded images are unaccessable then run:
php artisan storage:link
to create symbolic link from public/storage to storage/app/public - No copyright or anything attached, if you find this code you are free to use it wherever you want and modify as much as you like =)