Code Monkey home page Code Monkey logo

blogerday's Introduction

BlogerDay

Use Laravel v6.18.37

Description

Version Downloads License

BlogerDay - Web Projects Build By Laravel Framework

Images

  • You Can Show More Image In Folder [info_images]

Installation

1. Downloade Project

Run this at the command line:

git clone [email protected]: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.

blogerday's People

Contributors

heshamadel0007 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.