Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fajarwz/blog-laravel-global-scope
An implementation of Laravel Global Scope from fajarwz.com/blog
https://github.com/fajarwz/blog-laravel-global-scope
backend example-project laravel php
Last synced: 16 days ago
JSON representation
An implementation of Laravel Global Scope from fajarwz.com/blog
- Host: GitHub
- URL: https://github.com/fajarwz/blog-laravel-global-scope
- Owner: fajarwz
- Created: 2022-12-29T00:53:09.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-29T00:57:00.000Z (about 2 years ago)
- Last Synced: 2024-11-07T23:45:42.705Z (2 months ago)
- Topics: backend, example-project, laravel, php
- Language: PHP
- Homepage: https://fajarwz.com/blog/create-global-query-with-laravel-global-scope/
- Size: 68.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create Global Query With Laravel Global Scope
This is an implementation of creating a Laravel Global Scope. A blog about this can be found here: [Create Global Query With Laravel Global Scope | Fajarwz](https://fajarwz.com/blog/create-global-query-with-laravel-global-scope).## Installation
### Composer Packages
```
composer install
```## Configuration
### Create `.env` file from `.env.example`
```
cp .env.example .env
```### Generate Laravel App Key
```
php artisan key:generate
```### Database Integration
1. Create a database and connect it with Laravel with filling the DB name in `DB_DATABASE`
2. Adjust `DB_USERNAME`
3. Adjut `DB_PASSWORD`### Migrate the Database Migration and Run the Seeder
```
php artisan migrate --seed
```## Run App
```
php artisan serve
```