/BlogerDay

BlogerDay - Web Projects Build By Laravel Framework This WebSite With Admin Panel can Create, Update and Delete, Post, Admin, Tags, Images, Category and Gallary and Whene Create New Post You Can Choose Image From Gallary Or Uploade New One

Primary LanguageHTMLMIT LicenseMIT

BlogerDay

BlogerDay - Web Projects Build By Laravel Framework This WebSite With Admin Panel can Create, Update and Delete, Post, Admin, Tags, Images, Category and Gallary and Whene Create New Post You Can Choose Image From Gallary Or Uploade New One

Use Laravel v6.18.37

Version Downloads License

Images

  • You Can Show More Image In Folder [info_images]

Installation

1. Downloade Project

Run this at the command line:

git clone git@github.com:HeshamAdel007/BlogerDay.git

2. Install Laravel

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' => [
],

3. Functions

  • 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

4. Routes

  • 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]);

5. View Composer

  • 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());
});

6. Package & Tools Used

7. Connect With Me

Linkedin Logo Twitter Logo instagram logo Github logo Facebook logo Gmail logo

8. License

The Project is open-sourced software licensed under the MIT license.