Use Laravel v6.18.37
- You Can Show More Image In Folder [info_images]
Run this at the command line:
git clone [email protected]:HeshamAdel007/BlogerDay.git
Composer install
-
Create a New .env File
-
Could Copy From Existing .env.example, Update Relevant Settings (DB_DATABASE, DB_USERNAME,.....)
-
Generate App Encryption Key
php artisan key:generate
- Migrate The DataBase
- You Can Use My Data You Will Find In WinRAR File[ database(blogerday) ]
- Open PhpMyAdmin And Make Import To File [ blogerdays.sql ] Will Add Some Data To Tray Project
- Or Can Make Tour Data
php artisan migrate
- Migrate The Sedder
php artisan db:seed
- Use Laratrust For Handle [Roles & Permissions] Inside Application, You Can Edit This [Roles & Permissions]
// Will Find This Roles & Permissions In [ config/laratrust_seeder.php ]
'owner' => [
'users' => 'c,r,u,d',
'post' => 'c,r,u,d',
'category' => 'c,r,u,d',
'tag' => 'c,r,u,d',
'gallery' => 'c,r,u,d',
'setting' => 'r,u',
'profile' => 'r,u',
'contact' => 'r,d',
],
'super_admin' => [
],
'admin' => [
],
'user' => [
],
- When Register New User OR Login By Socialite Will Add Role & Create Profile [ User ] For This User
// Will Find This Function In User Model [ app/User.php ]
// Delete Comment After Make Databases Seeders
protected static function boot() {
parent::boot();
static::created( function ($user) {
$user->profile()->create([
'user_id' => $user->id,
]);
$user->attachRole('user');
$user->attachPermissions(['read_profile', 'update_profile', 'read_setting']);
});
} // End Of Boot
- In This Project I Make 2 Routes
- 1 Particular BackEnd [ DashBoard ] And You Will Find This In Path [routes/backend/web.php]
- 2 Particular ForntEnd [ Users ] And You Will Find This In Path [routes/web.php]
- You Will Find This Routes Configuration In Path [app/Providers/RouteServiceProvider] If You Need Make Any Changes On Route
- I Make No One Can’t Register If You Need Stopped This Change From False To True
// Change This From False To True
Auth::routes(['register' => false, 'verify' => true]);
- I Use View Composer To Path Some Data To Speciflc Views Pages
- And Will Find This In Path [app/Providers/AppServiceProvider]
// Example About View Composer
View::composer([
'layouts.front-end.parts-sidebar.most-views',
'pages.front-end.home',
'pages.front-end.category-page',
'layouts.front-end.search'
], function ($view) {
$view->with('post_trend', Post::with('category:id,name,slug', 'photo:id,image')->where([
['status', '=', 'published'],
['deleted_at', '=', Null],
])->withCount('comments')
->orderByDesc('view_count')
->get());
});
-
AdminLTE [ v3.0.5 ]
-
Laratrust [ v5.2.9 ]
-
Laravel Notify [ v1.1.2 ]
-
Intervention Image [ v2.5.1 ]
The Project is open-sourced software licensed under the MIT license.