224 changed files with 24642 additions and 0 deletions
-
15.editorconfig
-
51.env.example
-
1.git-credentials
-
5.gitattributes
-
15.gitignore
-
13.styleci.yml
-
58app/Console/Commands/UserAdmin.php
-
108app/Console/Commands/UserCreate.php
-
76app/Console/Commands/UserDelete.php
-
53app/Console/Commands/UserShow.php
-
49app/Console/Commands/UserTable.php
-
41app/Console/Kernel.php
-
41app/Exceptions/Handler.php
-
8app/Helpers/Go_back_link.php
-
47app/Http/Controllers/AdjunctAdditionController.php
-
41app/Http/Controllers/AdjunctController.php
-
39app/Http/Controllers/AdjunctcardController.php
-
40app/Http/Controllers/Auth/ConfirmPasswordController.php
-
22app/Http/Controllers/Auth/ForgotPasswordController.php
-
45app/Http/Controllers/Auth/LoginController.php
-
75app/Http/Controllers/Auth/RegisterController.php
-
30app/Http/Controllers/Auth/ResetPasswordController.php
-
42app/Http/Controllers/Auth/VerificationController.php
-
66app/Http/Controllers/BeerController.php
-
80app/Http/Controllers/BrewerieController.php
-
27app/Http/Controllers/BreweryController.php
-
13app/Http/Controllers/Controller.php
-
77app/Http/Controllers/EditController.php
-
48app/Http/Controllers/FermentationController.php
-
69app/Http/Controllers/GrainController.php
-
46app/Http/Controllers/GrainbillController.php
-
36app/Http/Controllers/GraincardController.php
-
28app/Http/Controllers/HomeController.php
-
44app/Http/Controllers/HopAdditionController.php
-
79app/Http/Controllers/HopController.php
-
36app/Http/Controllers/HopcardController.php
-
39app/Http/Controllers/LeannController.php
-
47app/Http/Controllers/MasheController.php
-
71app/Http/Controllers/SummarieController.php
-
57app/Http/Controllers/YeastController.php
-
40app/Http/Controllers/YeastcardController.php
-
66app/Http/Kernel.php
-
21app/Http/Middleware/Authenticate.php
-
17app/Http/Middleware/EncryptCookies.php
-
17app/Http/Middleware/PreventRequestsDuringMaintenance.php
-
32app/Http/Middleware/RedirectIfAuthenticated.php
-
19app/Http/Middleware/TrimStrings.php
-
20app/Http/Middleware/TrustHosts.php
-
23app/Http/Middleware/TrustProxies.php
-
17app/Http/Middleware/VerifyCsrfToken.php
-
33app/Leann.php
-
13app/Models/Adjunct.php
-
12app/Models/Adjunctaddition.php
-
17app/Models/Brewerie.php
-
11app/Models/Edit.php
-
13app/Models/Fermentation.php
-
12app/Models/Grain.php
-
12app/Models/Grainbill.php
-
13app/Models/Hop.php
-
15app/Models/Hopaddition.php
-
11app/Models/Leann.php
-
13app/Models/Mashe.php
-
13app/Models/Summarie.php
-
52app/Models/User.php
-
13app/Models/Yeast.php
-
29app/Providers/AppServiceProvider.php
-
30app/Providers/AuthServiceProvider.php
-
21app/Providers/BroadcastServiceProvider.php
-
32app/Providers/EventServiceProvider.php
-
63app/Providers/RouteServiceProvider.php
-
53artisan
-
55bootstrap/app.php
-
2bootstrap/cache/.gitignore
-
65composer.json
-
7885composer.lock
-
233config/app.php
-
117config/auth.php
-
64config/broadcasting.php
-
110config/cache.php
-
34config/cors.php
-
147config/database.php
-
11config/eloquent_model_generator.php
-
73config/filesystems.php
-
52config/hashing.php
-
105config/logging.php
-
110config/mail.php
-
93config/queue.php
-
33config/services.php
-
201config/session.php
-
36config/view.php
-
1database/.gitignore
-
47database/factories/UserFactory.php
-
37database/migrations/2014_10_12_000000_create_users_table.php
-
32database/migrations/2014_10_12_100000_create_password_resets_table.php
-
36database/migrations/2019_08_19_000000_create_failed_jobs_table.php
-
32database/migrations/2021_06_17_114842_create_adjuncts_table.php
-
36database/migrations/2021_06_17_114842_create_beer_adjuncts_table.php
-
35database/migrations/2021_06_17_114842_create_beer_fermentation_table.php
-
34database/migrations/2021_06_17_114842_create_beer_grains_table.php
-
34database/migrations/2021_06_17_114842_create_beer_hops_table.php
@ -0,0 +1,15 @@ |
|||||
|
root = true |
||||
|
|
||||
|
[*] |
||||
|
charset = utf-8 |
||||
|
end_of_line = lf |
||||
|
insert_final_newline = true |
||||
|
indent_style = space |
||||
|
indent_size = 4 |
||||
|
trim_trailing_whitespace = true |
||||
|
|
||||
|
[*.md] |
||||
|
trim_trailing_whitespace = false |
||||
|
|
||||
|
[*.{yml,yaml}] |
||||
|
indent_size = 2 |
||||
@ -0,0 +1,51 @@ |
|||||
|
APP_NAME=Laravel |
||||
|
APP_ENV=local |
||||
|
APP_KEY= |
||||
|
APP_DEBUG=true |
||||
|
APP_URL=http://localhost |
||||
|
|
||||
|
LOG_CHANNEL=stack |
||||
|
LOG_LEVEL=debug |
||||
|
|
||||
|
DB_CONNECTION=mysql |
||||
|
DB_HOST=127.0.0.1 |
||||
|
DB_PORT=3306 |
||||
|
DB_DATABASE=laravel |
||||
|
DB_USERNAME=root |
||||
|
DB_PASSWORD= |
||||
|
|
||||
|
BROADCAST_DRIVER=log |
||||
|
CACHE_DRIVER=file |
||||
|
FILESYSTEM_DRIVER=local |
||||
|
QUEUE_CONNECTION=sync |
||||
|
SESSION_DRIVER=file |
||||
|
SESSION_LIFETIME=120 |
||||
|
|
||||
|
MEMCACHED_HOST=127.0.0.1 |
||||
|
|
||||
|
REDIS_HOST=127.0.0.1 |
||||
|
REDIS_PASSWORD=null |
||||
|
REDIS_PORT=6379 |
||||
|
|
||||
|
MAIL_MAILER=smtp |
||||
|
MAIL_HOST=mailhog |
||||
|
MAIL_PORT=1025 |
||||
|
MAIL_USERNAME=null |
||||
|
MAIL_PASSWORD=null |
||||
|
MAIL_ENCRYPTION=null |
||||
|
MAIL_FROM_ADDRESS=null |
||||
|
MAIL_FROM_NAME="${APP_NAME}" |
||||
|
|
||||
|
AWS_ACCESS_KEY_ID= |
||||
|
AWS_SECRET_ACCESS_KEY= |
||||
|
AWS_DEFAULT_REGION=us-east-1 |
||||
|
AWS_BUCKET= |
||||
|
AWS_USE_PATH_STYLE_ENDPOINT=false |
||||
|
|
||||
|
PUSHER_APP_ID= |
||||
|
PUSHER_APP_KEY= |
||||
|
PUSHER_APP_SECRET= |
||||
|
PUSHER_APP_CLUSTER=mt1 |
||||
|
|
||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" |
||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" |
||||
@ -0,0 +1 @@ |
|||||
|
https://jk:Xq(0bVeHWy9FQO#dKx7-@git.nipponalba.scot |
||||
@ -0,0 +1,5 @@ |
|||||
|
* text=auto |
||||
|
*.css linguist-vendored |
||||
|
*.scss linguist-vendored |
||||
|
*.js linguist-vendored |
||||
|
CHANGELOG.md export-ignore |
||||
@ -0,0 +1,15 @@ |
|||||
|
/node_modules |
||||
|
/public/hot |
||||
|
/public/storage |
||||
|
/storage/*.key |
||||
|
/vendor |
||||
|
.env |
||||
|
.env.backup |
||||
|
.phpunit.result.cache |
||||
|
docker-compose.override.yml |
||||
|
Homestead.json |
||||
|
Homestead.yaml |
||||
|
npm-debug.log |
||||
|
yarn-error.log |
||||
|
/.idea |
||||
|
/.vscode |
||||
@ -0,0 +1,13 @@ |
|||||
|
php: |
||||
|
preset: laravel |
||||
|
disabled: |
||||
|
- no_unused_imports |
||||
|
finder: |
||||
|
not-name: |
||||
|
- index.php |
||||
|
- server.php |
||||
|
js: |
||||
|
finder: |
||||
|
not-name: |
||||
|
- webpack.mix.js |
||||
|
css: true |
||||
@ -0,0 +1,58 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Console\Commands; |
||||
|
|
||||
|
use Illuminate\Console\Command; |
||||
|
use App\Models\User; |
||||
|
|
||||
|
class UserAdmin extends Command |
||||
|
{ |
||||
|
/** |
||||
|
* The name and signature of the console command. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $signature = 'user:admin {id}'; |
||||
|
|
||||
|
/** |
||||
|
* The console command description. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $description = 'Make a user an admin, or remove admin privileges.'; |
||||
|
|
||||
|
/** |
||||
|
* Create a new command instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Execute the console command. |
||||
|
* |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function handle() |
||||
|
{ |
||||
|
$id = $this->argument('id'); |
||||
|
$user = User::whereUsername($id)->orWhere('id', $id)->first(); |
||||
|
if(!$user) { |
||||
|
$this->error('Could not find any user with that username or id.'); |
||||
|
exit; |
||||
|
} |
||||
|
$this->info('Found username: ' . $user->username); |
||||
|
$state = $user->is_admin ? 'Remove admin privileges from this user?' : 'Add admin privileges to this user?'; |
||||
|
$confirmed = $this->confirm($state); |
||||
|
if(!$confirmed) { |
||||
|
exit; |
||||
|
} |
||||
|
|
||||
|
$user->is_admin = !$user->is_admin; |
||||
|
$user->save(); |
||||
|
$this->info('Successfully changed permissions!'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,108 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Console\Commands; |
||||
|
|
||||
|
use Illuminate\Console\Command; |
||||
|
use App\Models\User; |
||||
|
|
||||
|
class UserCreate extends Command |
||||
|
{ |
||||
|
/** |
||||
|
* The name and signature of the console command. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $signature = 'user:create {--name=} {--username=} {--email=} {--password=} {--is_admin=0} {--confirm_email=0}'; |
||||
|
|
||||
|
/** |
||||
|
* The console command description. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $description = 'Create a new user'; |
||||
|
|
||||
|
/** |
||||
|
* Create a new command instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Execute the console command. |
||||
|
* |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function handle() |
||||
|
{ |
||||
|
$this->info('Creating a new user...'); |
||||
|
|
||||
|
$o = $this->options(); |
||||
|
|
||||
|
if( $o['name'] && |
||||
|
$o['username'] && |
||||
|
$o['email'] && |
||||
|
$o['password'] |
||||
|
) { |
||||
|
$user = new User; |
||||
|
$user->username = $o['username']; |
||||
|
$user->name = $o['name']; |
||||
|
$user->email = $o['email']; |
||||
|
$user->password = bcrypt($o['password']); |
||||
|
$user->is_admin = (bool) $o['is_admin']; |
||||
|
$user->email_verified_at = (bool) $o['confirm_email'] ? now() : null; |
||||
|
$user->save(); |
||||
|
|
||||
|
$this->info('Successfully created user!'); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
$name = $this->ask('Name'); |
||||
|
|
||||
|
$username = $this->ask('Username'); |
||||
|
|
||||
|
if(User::whereUsername($username)->exists()) { |
||||
|
$this->error('Username already in use, please try again...'); |
||||
|
exit; |
||||
|
} |
||||
|
|
||||
|
$email = $this->ask('Email'); |
||||
|
|
||||
|
if(User::whereEmail($email)->exists()) { |
||||
|
$this->error('Email already in use, please try again...'); |
||||
|
exit; |
||||
|
} |
||||
|
|
||||
|
$password = $this->secret('Password'); |
||||
|
$confirm = $this->secret('Confirm Password'); |
||||
|
|
||||
|
if($password !== $confirm) { |
||||
|
$this->error('Password mismatch, please try again...'); |
||||
|
exit; |
||||
|
} |
||||
|
|
||||
|
$is_admin = $this->confirm('Make this user an admin?'); |
||||
|
$confirm_email = $this->confirm('Manually verify email address?'); |
||||
|
|
||||
|
if($this->confirm('Are you sure you want to create this user?') && |
||||
|
$username && |
||||
|
$name && |
||||
|
$email && |
||||
|
$password |
||||
|
) { |
||||
|
$user = new User; |
||||
|
$user->username = $username; |
||||
|
$user->name = $name; |
||||
|
$user->email = $email; |
||||
|
$user->password = bcrypt($password); |
||||
|
$user->is_admin = $is_admin; |
||||
|
$user->email_verified_at = $confirm_email ? now() : null; |
||||
|
$user->save(); |
||||
|
|
||||
|
$this->info('Created new user!'); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,76 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Console\Commands; |
||||
|
|
||||
|
use Illuminate\Console\Command; |
||||
|
use App\Models\User; |
||||
|
use App\Jobs\DeletePipeline\DeleteAccountPipeline; |
||||
|
|
||||
|
class UserDelete extends Command |
||||
|
{ |
||||
|
/** |
||||
|
* The name and signature of the console command. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $signature = 'user:delete {id} {--force}'; |
||||
|
|
||||
|
/** |
||||
|
* The console command description. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $description = 'Delete account'; |
||||
|
|
||||
|
/** |
||||
|
* Create a new command instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Execute the console command. |
||||
|
* |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function handle() |
||||
|
{ |
||||
|
$id = $this->argument('id'); |
||||
|
$force = $this->option('force'); |
||||
|
|
||||
|
if(ctype_digit($id) == true) { |
||||
|
$user = User::find($id); |
||||
|
} else { |
||||
|
$user = User::whereUsername($id)->first(); |
||||
|
} |
||||
|
|
||||
|
if(!$user) { |
||||
|
$this->error('Could not find any user with that username or id.'); |
||||
|
exit; |
||||
|
} |
||||
|
|
||||
|
if($user->is_admin == true) { |
||||
|
$this->error('Cannot delete an admin account from CLI.'); |
||||
|
exit; |
||||
|
} |
||||
|
|
||||
|
if(!$this->confirm('Are you sure you want to delete this account?')) { |
||||
|
exit; |
||||
|
} |
||||
|
|
||||
|
$confirmation = $this->ask('Enter the username to confirm deletion'); |
||||
|
|
||||
|
if($confirmation !== $user->username) { |
||||
|
$this->error('Username does not match, exiting...'); |
||||
|
exit; |
||||
|
} |
||||
|
|
||||
|
$user->delete(); |
||||
|
$this->error('User deleted'); |
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,53 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Console\Commands; |
||||
|
|
||||
|
use Illuminate\Console\Command; |
||||
|
use App\Models\User; |
||||
|
|
||||
|
class UserShow extends Command |
||||
|
{ |
||||
|
/** |
||||
|
* The name and signature of the console command. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $signature = 'user:show {id}'; |
||||
|
|
||||
|
/** |
||||
|
* The console command description. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $description = 'Show user info'; |
||||
|
|
||||
|
/** |
||||
|
* Create a new command instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Execute the console command. |
||||
|
* |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function handle() |
||||
|
{ |
||||
|
$id = $this->argument('id'); |
||||
|
$user = User::whereUsername($id)->orWhere('id', $id)->first(); |
||||
|
if(!$user) { |
||||
|
$this->error('Could not find any user with that username or id.'); |
||||
|
exit; |
||||
|
} |
||||
|
|
||||
|
$this->info('User ID: ' . $user->id); |
||||
|
$this->info('Username: ' . $user->username); |
||||
|
$this->info('Email: ' . $user->email); |
||||
|
$this->info('Joined: ' . $user->created_at->diffForHumans()); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Console\Commands; |
||||
|
|
||||
|
use Illuminate\Console\Command; |
||||
|
use App\Models\User; |
||||
|
|
||||
|
class UserTable extends Command |
||||
|
{ |
||||
|
/** |
||||
|
* The name and signature of the console command. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $signature = 'user:table {limit=10}'; |
||||
|
|
||||
|
/** |
||||
|
* The console command description. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $description = 'Display latest users'; |
||||
|
|
||||
|
/** |
||||
|
* Create a new command instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
parent::__construct(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Execute the console command. |
||||
|
* |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function handle() |
||||
|
{ |
||||
|
$limit = $this->argument('limit'); |
||||
|
|
||||
|
$headers = ['ID', 'Username', 'Name', 'Registered']; |
||||
|
|
||||
|
$users = User::orderByDesc('id')->take($limit)->get(['id', 'username', 'name', 'created_at'])->toArray(); |
||||
|
|
||||
|
$this->table($headers, $users); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,41 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Console; |
||||
|
|
||||
|
use Illuminate\Console\Scheduling\Schedule; |
||||
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; |
||||
|
|
||||
|
class Kernel extends ConsoleKernel |
||||
|
{ |
||||
|
/** |
||||
|
* The Artisan commands provided by your application. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $commands = [ |
||||
|
//
|
||||
|
]; |
||||
|
|
||||
|
/** |
||||
|
* Define the application's command schedule. |
||||
|
* |
||||
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule |
||||
|
* @return void |
||||
|
*/ |
||||
|
protected function schedule(Schedule $schedule) |
||||
|
{ |
||||
|
// $schedule->command('inspire')->hourly();
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Register the commands for the application. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
protected function commands() |
||||
|
{ |
||||
|
$this->load(__DIR__.'/Commands'); |
||||
|
|
||||
|
require base_path('routes/console.php'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,41 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Exceptions; |
||||
|
|
||||
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; |
||||
|
use Throwable; |
||||
|
|
||||
|
class Handler extends ExceptionHandler |
||||
|
{ |
||||
|
/** |
||||
|
* A list of the exception types that are not reported. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $dontReport = [ |
||||
|
//
|
||||
|
]; |
||||
|
|
||||
|
/** |
||||
|
* A list of the inputs that are never flashed for validation exceptions. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $dontFlash = [ |
||||
|
'current_password', |
||||
|
'password', |
||||
|
'password_confirmation', |
||||
|
]; |
||||
|
|
||||
|
/** |
||||
|
* Register the exception handling callbacks for the application. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function register() |
||||
|
{ |
||||
|
$this->reportable(function (Throwable $e) { |
||||
|
//
|
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
<?php |
||||
|
|
||||
|
// Insert a link to go back to the previous page
|
||||
|
function link_back($body = 'Go Back') |
||||
|
{ |
||||
|
return link_to(URL::previous(), $body); |
||||
|
} |
||||
|
?>
|
||||
@ -0,0 +1,47 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Adjunctaddition; |
||||
|
|
||||
|
class AdjunctAdditionController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$project = Adjunctaddition::get(); |
||||
|
return view('adjunctadditions')->with('adjunctadditions', $project); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'beer_id' => 'required', |
||||
|
'adjunct_id' => 'required', |
||||
|
'amount' => 'required', |
||||
|
'timing' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$adjunct = new Adjunctaddition; |
||||
|
$lastID = Adjunctaddition::orderBy('id','desc')->value('id'); |
||||
|
$adjunct->id = number_format($lastID) + 1; |
||||
|
$adjunct->beer_id = $request->input('beer_id'); |
||||
|
$adjunct->adjunct_id = $request->input('adjunct_id'); |
||||
|
$adjunct->amount = $request->input('amount'); |
||||
|
$adjunct->timing = $request->input('timing'); |
||||
|
$adjunct->alternative = $request->input('alternative'); |
||||
|
$adjunct->notes = $request->input('notes'); |
||||
|
|
||||
|
$adjunct->save(); |
||||
|
|
||||
|
return redirect('/adjunctadditions')->with('success', 'Adjunct Addition Added'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,41 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Adjunct; |
||||
|
|
||||
|
class AdjunctController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$adjuncts = Adjunct::orderBy('name')->get(); |
||||
|
return view('adjuncts')->with('adjuncts', $adjuncts); |
||||
|
} |
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'name' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$adjunct = new Adjunct; |
||||
|
$lastID = Adjunct::orderBy('id','desc')->value('id'); |
||||
|
$adjunct->id = number_format($lastID) + 1; |
||||
|
$adjunct->name = $request->input('name'); |
||||
|
$adjunct->save(); |
||||
|
|
||||
|
return redirect('/adjuncts')->with('success', 'Adjunct Added'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,39 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Adjunct; |
||||
|
use App\Models\Adjunctaddition; |
||||
|
use App\Models\Summarie; |
||||
|
use Illuminate\Support\Facades\DB; |
||||
|
|
||||
|
class AdjunctcardController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index($adjunctID) |
||||
|
{ |
||||
|
$adjunct = Adjunct::where('id', $adjunctID)->first(); |
||||
|
$adjunctadditions = Adjunctaddition::where('adjunct_id', $adjunctID)->distinct('beer_id')->get(); |
||||
|
foreach ($adjunctadditions as $adjuncts) |
||||
|
{ |
||||
|
$beerName = DB::table('summaries')->where('beer_id', $adjuncts->beer_id)->value('name'); |
||||
|
$breweryID = DB::table('summaries')->where('beer_id', $adjuncts->beer_id)->value('brewery_id'); |
||||
|
$breweryName = DB::table('breweries')->where('id', $breweryID)->value('name'); |
||||
|
$adjuncts['beer'] = $beerName; |
||||
|
$adjuncts['breweryID'] = $breweryID; |
||||
|
$adjuncts['brewery']=$breweryName; |
||||
|
} |
||||
|
$adjunctadditions = $adjunctadditions->sortBy('brewery'); |
||||
|
$data = array('adjunct'=>$adjunct, 'adjunctadditions'=>$adjunctadditions); |
||||
|
return view('adjunct')->with($data); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,40 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers\Auth; |
||||
|
|
||||
|
use App\Http\Controllers\Controller; |
||||
|
use App\Providers\RouteServiceProvider; |
||||
|
use Illuminate\Foundation\Auth\ConfirmsPasswords; |
||||
|
|
||||
|
class ConfirmPasswordController extends Controller |
||||
|
{ |
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Confirm Password Controller |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This controller is responsible for handling password confirmations and |
||||
|
| uses a simple trait to include the behavior. You're free to explore |
||||
|
| this trait and override any functions that require customization. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
use ConfirmsPasswords; |
||||
|
|
||||
|
/** |
||||
|
* Where to redirect users when the intended url fails. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $redirectTo = RouteServiceProvider::HOME; |
||||
|
|
||||
|
/** |
||||
|
* Create a new controller instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,22 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers\Auth; |
||||
|
|
||||
|
use App\Http\Controllers\Controller; |
||||
|
use Illuminate\Foundation\Auth\SendsPasswordResetEmails; |
||||
|
|
||||
|
class ForgotPasswordController extends Controller |
||||
|
{ |
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Password Reset Controller |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This controller is responsible for handling password reset emails and |
||||
|
| includes a trait which assists in sending these notifications from |
||||
|
| your application to your users. Feel free to explore this trait. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
use SendsPasswordResetEmails; |
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers\Auth; |
||||
|
|
||||
|
use App\Http\Controllers\Controller; |
||||
|
use App\Providers\RouteServiceProvider; |
||||
|
use Illuminate\Foundation\Auth\AuthenticatesUsers; |
||||
|
|
||||
|
class LoginController extends Controller |
||||
|
{ |
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Login Controller |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This controller handles authenticating users for the application and |
||||
|
| redirecting them to your home screen. The controller uses a trait |
||||
|
| to conveniently provide its functionality to your applications. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
use AuthenticatesUsers; |
||||
|
|
||||
|
/** |
||||
|
* Where to redirect users after login. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $redirectTo = RouteServiceProvider::HOME; |
||||
|
|
||||
|
/** |
||||
|
* Create a new controller instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('guest')->except('logout'); |
||||
|
} |
||||
|
|
||||
|
public function username() |
||||
|
{ |
||||
|
return 'username'; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,75 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers\Auth; |
||||
|
|
||||
|
use App\Http\Controllers\Controller; |
||||
|
use App\Providers\RouteServiceProvider; |
||||
|
use App\Models\User; |
||||
|
use Illuminate\Foundation\Auth\RegistersUsers; |
||||
|
use Illuminate\Support\Facades\Hash; |
||||
|
use Illuminate\Support\Facades\Validator; |
||||
|
|
||||
|
class RegisterController extends Controller |
||||
|
{ |
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Register Controller |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This controller handles the registration of new users as well as their |
||||
|
| validation and creation. By default this controller uses a trait to |
||||
|
| provide this functionality without requiring any additional code. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
use RegistersUsers; |
||||
|
|
||||
|
/** |
||||
|
* Where to redirect users after registration. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $redirectTo = RouteServiceProvider::HOME; |
||||
|
|
||||
|
/** |
||||
|
* Create a new controller instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('guest'); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Get a validator for an incoming registration request. |
||||
|
* |
||||
|
* @param array $data |
||||
|
* @return \Illuminate\Contracts\Validation\Validator |
||||
|
*/ |
||||
|
protected function validator(array $data) |
||||
|
{ |
||||
|
return Validator::make($data, [ |
||||
|
'name' => ['required', 'string', 'max:255'], |
||||
|
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], |
||||
|
'username' => ['required', 'string', 'min:3', 'max:255'], |
||||
|
'password' => ['required', 'string', 'min:8', 'confirmed'], |
||||
|
]); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Create a new user instance after a valid registration. |
||||
|
* |
||||
|
* @param array $data |
||||
|
* @return \App\Models\User |
||||
|
*/ |
||||
|
protected function create(array $data) |
||||
|
{ |
||||
|
return User::create([ |
||||
|
'name' => $data['name'], |
||||
|
'email' => $data['email'], |
||||
|
'username' => $data['username'], |
||||
|
'password' => Hash::make($data['password']), |
||||
|
]); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers\Auth; |
||||
|
|
||||
|
use App\Http\Controllers\Controller; |
||||
|
use App\Providers\RouteServiceProvider; |
||||
|
use Illuminate\Foundation\Auth\ResetsPasswords; |
||||
|
|
||||
|
class ResetPasswordController extends Controller |
||||
|
{ |
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Password Reset Controller |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This controller is responsible for handling password reset requests |
||||
|
| and uses a simple trait to include this behavior. You're free to |
||||
|
| explore this trait and override any methods you wish to tweak. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
use ResetsPasswords; |
||||
|
|
||||
|
/** |
||||
|
* Where to redirect users after resetting their password. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $redirectTo = RouteServiceProvider::HOME; |
||||
|
} |
||||
@ -0,0 +1,42 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers\Auth; |
||||
|
|
||||
|
use App\Http\Controllers\Controller; |
||||
|
use App\Providers\RouteServiceProvider; |
||||
|
use Illuminate\Foundation\Auth\VerifiesEmails; |
||||
|
|
||||
|
class VerificationController extends Controller |
||||
|
{ |
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Email Verification Controller |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This controller is responsible for handling email verification for any |
||||
|
| user that recently registered with the application. Emails may also |
||||
|
| be re-sent if the user didn't receive the original email message. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
use VerifiesEmails; |
||||
|
|
||||
|
/** |
||||
|
* Where to redirect users after verification. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $redirectTo = RouteServiceProvider::HOME; |
||||
|
|
||||
|
/** |
||||
|
* Create a new controller instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
$this->middleware('signed')->only('verify'); |
||||
|
$this->middleware('throttle:6,1')->only('verify', 'resend'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,66 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Brewerie; |
||||
|
use App\Models\Summarie; |
||||
|
use App\Models\Grainbill; |
||||
|
use App\Models\Hopaddition; |
||||
|
use App\Models\Adjunctaddition; |
||||
|
use App\Models\Adjunct; |
||||
|
use App\Models\Hop; |
||||
|
use App\Models\Grain; |
||||
|
use App\Models\Fermentation; |
||||
|
use App\Models\Yeast; |
||||
|
use App\Models\Mashe; |
||||
|
use Illuminate\Support\Facades\DB; |
||||
|
|
||||
|
class BeerController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index($beerID) |
||||
|
{ |
||||
|
$beer = DB::table('summaries')->where('beer_id', $beerID)->first(); |
||||
|
$breweries = Brewerie::where('id', $beer->brewery_id)->get(); |
||||
|
$grainbills = Grainbill::where('beer_id', $beerID)->get(); |
||||
|
foreach($grainbills as $grain) |
||||
|
{ |
||||
|
$grainname = DB::table('grains')->where('id', $grain->grain_id)->first(); |
||||
|
$grain['grain_name'] = $grainname->name; |
||||
|
}; |
||||
|
$mashsteps = Mashe::where('beer_id', $beerID)->get(); |
||||
|
$hopadditions = Hopaddition::where('beer_id', $beerID)->get(); |
||||
|
foreach($hopadditions as $hop) |
||||
|
{ |
||||
|
$hopname = DB::table('hops')->where('id', $hop->hop_id)->first(); |
||||
|
$hop['hop_name'] = $hopname->name; |
||||
|
}; |
||||
|
$yeastadditions = Fermentation::where('beer_id', $beerID)->get(); |
||||
|
foreach($yeastadditions as $yeast) |
||||
|
{ |
||||
|
$yeastname = DB::table('yeasts')->where('id', $yeast->yeast_id)->first(); |
||||
|
$yeast['yeast_name'] = $yeastname->name; |
||||
|
if($yeast->alternative) { |
||||
|
$altname = DB::table('yeasts')->where('id', $yeast->alternative)->value('name'); |
||||
|
$yeast['altname'] = $altname; |
||||
|
} |
||||
|
|
||||
|
}; |
||||
|
$adjunctadditions = Adjunctaddition::where('beer_id', $beerID)->get(); |
||||
|
foreach($adjunctadditions as $adjunct) |
||||
|
{ |
||||
|
$adjunctname = DB::table('adjuncts')->where('id', $adjunct->adjunct_id)->first(); |
||||
|
$adjunct['adjunct_name'] = $adjunctname->name; |
||||
|
}; |
||||
|
$data = array('breweries'=>$breweries, 'beer'=>$beer, 'grainbills'=>$grainbills, 'mashsteps'=>$mashsteps, 'hopadditions'=>$hopadditions, 'adjunctadditions'=>$adjunctadditions, 'yeastadditions'=>$yeastadditions); |
||||
|
return view('beer')->with($data); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,80 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Brewerie; |
||||
|
class BrewerieController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$project = Brewerie::orderBy('name')->get(); |
||||
|
return view('breweries.index')->with('breweries', $project); |
||||
|
} |
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'name' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$brewerie = new Brewerie; |
||||
|
$lastID = Brewerie::orderBy('id','desc')->value('id'); |
||||
|
$brewerie->id = number_format($lastID) + 1; |
||||
|
$brewerie->name = $request->input('name'); |
||||
|
if ($request->input('place')) |
||||
|
{ |
||||
|
$brewerie->place = $request->input('place'); |
||||
|
} |
||||
|
if ($request->input('country')) |
||||
|
{ |
||||
|
$brewerie->country = $request->input('country'); |
||||
|
} |
||||
|
$brewerie->save(); |
||||
|
|
||||
|
return redirect('/breweries')->with('success', 'Brewery Added'); |
||||
|
} |
||||
|
|
||||
|
public function edit($id){ |
||||
|
$brewery = Brewerie::where('id', (int)$id)->first(); |
||||
|
return view('breweries.edit')->with('brewery', $brewery); |
||||
|
} |
||||
|
|
||||
|
public function update(Request $request, $id) |
||||
|
{ |
||||
|
$request->validate([ |
||||
|
'name'=>'required', |
||||
|
'place'=>'required', |
||||
|
'country'=>'required' |
||||
|
]); |
||||
|
|
||||
|
$brewery = Brewerie::where('id', $id)->first(); |
||||
|
$brewery->name = $request->get('name'); |
||||
|
$brewery->place = $request->get('place'); |
||||
|
$brewery->country = $request->get('country'); |
||||
|
$brewery->save(); |
||||
|
|
||||
|
return redirect('/breweries')->with('success', 'Brewery updated!'); |
||||
|
} |
||||
|
public function create() |
||||
|
{ |
||||
|
return view('breweries.create'); |
||||
|
} |
||||
|
public function destroy($id) |
||||
|
{ |
||||
|
$brewery = Brewerie::find($id); |
||||
|
$brewery->delete(); |
||||
|
|
||||
|
return redirect('/breweries')->with('success', 'Brewery deleted!'); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,27 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Brewerie; |
||||
|
use App\Models\Summarie; |
||||
|
|
||||
|
class BreweryController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index($breweryID) |
||||
|
{ |
||||
|
$breweries = Brewerie::where('id', (int)$breweryID)->get(); |
||||
|
$beers = Summarie::where('brewery_id', $breweryID)->get(); |
||||
|
$data = array('breweries'=>$breweries, 'beers'=>$beers); |
||||
|
return view('brewery', compact('breweries', 'beers')); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
@ -0,0 +1,13 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; |
||||
|
use Illuminate\Foundation\Bus\DispatchesJobs; |
||||
|
use Illuminate\Foundation\Validation\ValidatesRequests; |
||||
|
use Illuminate\Routing\Controller as BaseController; |
||||
|
|
||||
|
class Controller extends BaseController |
||||
|
{ |
||||
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
||||
|
} |
||||
@ -0,0 +1,77 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Grainbill; |
||||
|
|
||||
|
class EditController extends Controller |
||||
|
{ |
||||
|
/** |
||||
|
* Create a new controller instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Show the application dashboard. |
||||
|
* |
||||
|
* @return \Illuminate\Contracts\Support\Renderable |
||||
|
*/ |
||||
|
public function index() |
||||
|
{ |
||||
|
return view('edit'); |
||||
|
} |
||||
|
|
||||
|
public function gstore(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'name' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$grain = new Grainbill; |
||||
|
$lastID = Grainbill::orderBy('id','desc')->value('id'); |
||||
|
$grain->id = number_format($lastID) + 1; |
||||
|
$grain->name = $request->input('name'); |
||||
|
if ($request->input('flavour')) |
||||
|
{ |
||||
|
$grain->flavour = $request->input('flavour'); |
||||
|
} |
||||
|
if ($request->input('lintner')) |
||||
|
{ |
||||
|
$grain->lintner = $request->input('lintner'); |
||||
|
} |
||||
|
if ($request->input('winkol')) |
||||
|
{ |
||||
|
$grain->winkol = $request->input('winkol'); |
||||
|
} |
||||
|
if ($request->input('lovibond')) |
||||
|
{ |
||||
|
$grain->lovibond = $request->input('lovibond'); |
||||
|
} |
||||
|
if ($request->input('colour')) |
||||
|
{ |
||||
|
$grain->colour = $request->input('colour'); |
||||
|
} |
||||
|
if ($request->input('alternative')) |
||||
|
{ |
||||
|
$altArr = array_map('intval',explode(',',$request->input('alternative'))); |
||||
|
$grain->alternative = $altArr; |
||||
|
} |
||||
|
if ($request->input('ebc')) |
||||
|
{ |
||||
|
$grain->ebc = $request->input('ebc'); |
||||
|
} |
||||
|
$grain->save(); |
||||
|
|
||||
|
return redirect('/edit')->with('success', 'Grain Bill Added'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,48 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Fermentation; |
||||
|
class FermentationController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$project = Fermentation::get(); |
||||
|
return view('fermentations')->with('fermentations', $project); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'beer_id' => 'required', |
||||
|
'yeast_id' => 'required', |
||||
|
'temperature' => 'required', |
||||
|
'duration' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$yeast = new Fermentations; |
||||
|
$lastID = Fermentations::orderBy('id','desc')->value('id'); |
||||
|
$yeast->id = number_format($lastID) + 1; |
||||
|
$yeast->beer_id = $request->input('beer_id'); |
||||
|
$yeast->yeast_id = $request->input('yeast_id'); |
||||
|
$yeast->temperature = $request->input('temperature'); |
||||
|
$yeast->duration = $request->input('duration'); |
||||
|
if ($request->input('alternative')) |
||||
|
{ |
||||
|
$yeast->alternative = $request->input('alternative'); |
||||
|
} |
||||
|
$yeast->save(); |
||||
|
|
||||
|
return redirect('/fermnentations')->with('success', 'Fermentation Step Added'); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,69 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Grain; |
||||
|
use Illuminate\Support\Facades\DB; |
||||
|
class GrainController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$grains = Grain::orderBy('name')->get(); |
||||
|
return view('grains')->with('grains', $grains); |
||||
|
} |
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'name' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$grain = new Grain; |
||||
|
$lastID = Grain::orderBy('id','desc')->value('id'); |
||||
|
$grain->id = number_format($lastID) + 1; |
||||
|
$grain->name = $request->input('name'); |
||||
|
if ($request->input('flavour')) |
||||
|
{ |
||||
|
$grain->flavour = $request->input('flavour'); |
||||
|
} |
||||
|
if ($request->input('lintner')) |
||||
|
{ |
||||
|
$grain->lintner = $request->input('lintner'); |
||||
|
} |
||||
|
if ($request->input('winkol')) |
||||
|
{ |
||||
|
$grain->winkol = $request->input('winkol'); |
||||
|
} |
||||
|
if ($request->input('lovibond')) |
||||
|
{ |
||||
|
$grain->lovibond = $request->input('lovibond'); |
||||
|
} |
||||
|
if ($request->input('colour')) |
||||
|
{ |
||||
|
$grain->colour = $request->input('colour'); |
||||
|
} |
||||
|
if ($request->input('alternative')) |
||||
|
{ |
||||
|
$altArr = array_map('intval',explode(',',$request->input('alternative'))); |
||||
|
$grain->alternative = $altArr; |
||||
|
} |
||||
|
if ($request->input('ebc')) |
||||
|
{ |
||||
|
$grain->ebc = $request->input('ebc'); |
||||
|
} |
||||
|
$grain->save(); |
||||
|
|
||||
|
return redirect('/grains')->with('success', 'Grain Added'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,46 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Grainbill; |
||||
|
|
||||
|
class GrainbillController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$project = Grainbill::get(); |
||||
|
return view('grainbills')->with('grainbills', $project); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'beer_id' => 'required', |
||||
|
'grain_id' => 'required', |
||||
|
'amount' => 'required', |
||||
|
'grain_bill' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$grain = new Grainbill; |
||||
|
$lastID = Grainbill::orderBy('id','desc')->value('id'); |
||||
|
$grain->id = number_format($lastID) + 1; |
||||
|
$grain->beer_id = $request->input('beer_id'); |
||||
|
$grain->grain_id = $request->input('grain_id'); |
||||
|
$grain->amount = $request->input('amount'); |
||||
|
$grain->grain_bill = $request->input('grain_bill'); |
||||
|
$grain->save(); |
||||
|
|
||||
|
return redirect('/grainbills')->with('success', 'Grain Bill Added'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Grain; |
||||
|
use App\Models\Grainbill; |
||||
|
use Illuminate\Support\Facades\DB; |
||||
|
|
||||
|
class GraincardController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index($grainID) |
||||
|
{ |
||||
|
$grain = DB::table('grains')->where('id', $grainID)->first(); |
||||
|
$grainadditions = Grainbill::where('grain_id', $grainID)->distinct('beer_id')->get(); |
||||
|
foreach ($grainadditions as $grains) |
||||
|
{ |
||||
|
$beerName = DB::table('summaries')->where('beer_id', $grains->beer_id)->value('name'); |
||||
|
$breweryID = DB::table('summaries')->where('beer_id', $grains->beer_id)->value('brewery_id'); |
||||
|
$breweryName = DB::table('breweries')->where('id', $breweryID)->value('name'); |
||||
|
$grains['beer'] = $beerName; |
||||
|
$grains['breweryID'] = $breweryID; |
||||
|
$grains['brewery']=$breweryName; |
||||
|
} |
||||
|
$grainadditions = $grainadditions->sortBy('brewery'); |
||||
|
$data = array('grain'=>$grain, 'grainadditions'=>$grainadditions); |
||||
|
return view('grain')->with($data); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
|
||||
|
class HomeController extends Controller |
||||
|
{ |
||||
|
/** |
||||
|
* Create a new controller instance. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Show the application dashboard. |
||||
|
* |
||||
|
* @return \Illuminate\Contracts\Support\Renderable |
||||
|
*/ |
||||
|
public function index() |
||||
|
{ |
||||
|
return view('home'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Hopaddition; |
||||
|
class HopAdditionController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$project = Hopaddition::orderBy('id')->get(); |
||||
|
return view('hopadditions')->with('hopadditions', $project); |
||||
|
} |
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'beer_id' => 'required', |
||||
|
'hop_id' => 'required', |
||||
|
'amount' => 'required', |
||||
|
'timing' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$hop = new Hopaddition; |
||||
|
$lastID = Hopaddition::orderBy('id','desc')->value('id'); |
||||
|
$hop->id = number_format($lastID) + 1; |
||||
|
$hop->beer_id = $request->input('beer_id'); |
||||
|
$hop->hop_id = $request->input('hop_id'); |
||||
|
$hop->amount = $request->input('amount'); |
||||
|
$hop->timing = $request->input('timing'); |
||||
|
$hop->save(); |
||||
|
|
||||
|
return redirect('/hopadditions')->with('success', 'Hop Addition Added'); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Hop; |
||||
|
|
||||
|
class HopController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$project = Hop::orderBy('name')->get(); |
||||
|
return view('hops')->with('hops', $project); |
||||
|
} |
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'name' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$hop = new hop; |
||||
|
$lastID = Hop::orderBy('id','desc')->value('id'); |
||||
|
$hop->id = number_format($lastID) + 1; |
||||
|
$hop->name = $request->input('name'); |
||||
|
if ($request->input('alpha_acid')) |
||||
|
{ |
||||
|
$hop->alpha_acid = $request->input('alpha_acid'); |
||||
|
} |
||||
|
$hop->bitter = $request->input('bitter'); |
||||
|
$hop->aroma = $request->input('aroma'); |
||||
|
if ($request->input('beta_acid')) |
||||
|
{ |
||||
|
$hop->beta_acid = $request->input('beta_acid'); |
||||
|
} |
||||
|
if ($request->input('myrcene')) |
||||
|
{ |
||||
|
$hop->myrcene = $request->input('myrcene'); |
||||
|
} |
||||
|
if ($request->input('profile')) |
||||
|
{ |
||||
|
$hop->profile = '{'.$request->input('profile').'}'; |
||||
|
} |
||||
|
if ($request->input('humulene')) |
||||
|
{ |
||||
|
$hop->humulene = $request->input('humulene'); |
||||
|
} |
||||
|
if ($request->input('total_oil')) |
||||
|
{ |
||||
|
$hop->total_oil = $request->input('total_oil'); |
||||
|
} |
||||
|
if ($request->input('cohumulone')) |
||||
|
{ |
||||
|
$hop->cohumulone = $request->input('cohumulone'); |
||||
|
} |
||||
|
if ($request->input('farnesene')) |
||||
|
{ |
||||
|
$hop->farnesene = $request->input('farnesene'); |
||||
|
} |
||||
|
if ($request->input('caryophyllene')) |
||||
|
{ |
||||
|
$hop->caryophyllene = $request->input('caryophyllene'); |
||||
|
} |
||||
|
$hop->save(); |
||||
|
|
||||
|
return redirect('/hops')->with('success', 'Hop Added'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Hop; |
||||
|
use App\Models\Hopaddition; |
||||
|
use Illuminate\Support\Facades\DB; |
||||
|
|
||||
|
class HopcardController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index($hopID) |
||||
|
{ |
||||
|
$hop = DB::table('hops')->where('id', $hopID)->first(); |
||||
|
$hopadditions = Hopaddition::where('hop_id', $hopID)->distinct('beer_id')->get(); |
||||
|
foreach ($hopadditions as $hops) |
||||
|
{ |
||||
|
$beerName = DB::table('summaries')->where('beer_id', $hops->beer_id)->value('name'); |
||||
|
$breweryID = DB::table('summaries')->where('beer_id', $hops->beer_id)->value('brewery_id'); |
||||
|
$breweryName = DB::table('breweries')->where('id', $breweryID)->value('name'); |
||||
|
$hops['beer'] = $beerName; |
||||
|
$hops['breweryID'] = $breweryID; |
||||
|
$hops['brewery']=$breweryName; |
||||
|
} |
||||
|
$hopadditions = $hopadditions->sortBy('brewery'); |
||||
|
$data = array('hop'=>$hop, 'hopadditions'=>$hopadditions); |
||||
|
return view('hop')->with($data); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Leann; |
||||
|
class LeannController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$project = Leann::where('user_id', auth()->user()->id)->get(); |
||||
|
return view('home')->with('projects', $project); |
||||
|
} |
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'project_name' => 'required', |
||||
|
'description' => 'required' |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$project = new Leann; |
||||
|
$project->name = $request->input('project_name'); |
||||
|
$project->description = $request->input('description'); |
||||
|
$project->user_id = auth()->user()->id; |
||||
|
|
||||
|
$project->save(); |
||||
|
|
||||
|
return redirect('/home')->with('success', 'Project Added'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Mashe; |
||||
|
|
||||
|
class MasheController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$project = Mashe::get(); |
||||
|
return view('mashes')->with('mashes', $project); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'beer_id' => 'required', |
||||
|
'temperature' => 'required', |
||||
|
'duration' => 'required', |
||||
|
'stage' => 'required', |
||||
|
'boil' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$mashes = new Mashe; |
||||
|
$lastID = Mashe::orderBy('id','desc')->value('id'); |
||||
|
$mashes->id = number_format($lastID) + 1; |
||||
|
$mashes->beer_id = $request->input('beer_id'); |
||||
|
$mashes->temperature = $request->input('temperature'); |
||||
|
$mashes->duration = $request->input('duration'); |
||||
|
$mashes->stage = $request->input('stage'); |
||||
|
$mashes->boil = $request->input('boil'); |
||||
|
$mashes->save(); |
||||
|
|
||||
|
return redirect('/mashes')->with('success', 'Mash Step Added'); |
||||
|
} |
||||
|
//
|
||||
|
} |
||||
@ -0,0 +1,71 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Summarie; |
||||
|
use Illuminate\Support\Facades\DB; |
||||
|
|
||||
|
class SummarieController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$beers = Summarie::orderBy('name')->get(); |
||||
|
foreach ($beers as $beer) |
||||
|
{ |
||||
|
$brewery = DB::table('breweries')->where('id', $beer->brewery_id)->value('name'); |
||||
|
$beer['brewery'] = $brewery; |
||||
|
} |
||||
|
return view('beers')->with('summaries', $beers); |
||||
|
} |
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'name' => 'required', |
||||
|
'type' => 'required', |
||||
|
'abv' => 'required', |
||||
|
'fg' => 'required', |
||||
|
'keywords' => 'required', |
||||
|
'og' => 'required', |
||||
|
'source' => 'required', |
||||
|
'batch' => 'required', |
||||
|
'brewery_id' => 'required' |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$beers = new Summarie; |
||||
|
$lastID = Summarie::orderBy('beer_id','desc')->value('beer_id'); |
||||
|
$beers->beer_id = number_format($lastID) + 1; |
||||
|
$beers->name = $request->input('name'); |
||||
|
$beers->type = $request->input('type'); |
||||
|
$beers->abv = $request->input('abv'); |
||||
|
$beers->fg = $request->input('fg'); |
||||
|
$beers->keywords = '{'.$request->input('keywords').'}'; |
||||
|
if ($request->mine) |
||||
|
{ |
||||
|
$beers->mine = true; |
||||
|
} else { |
||||
|
$beers->mine = false; |
||||
|
} |
||||
|
$beers->og = $request->input('og'); |
||||
|
$beers->source = $request->input('source'); |
||||
|
$beers->batch = $request->input('batch'); |
||||
|
$beers->brewery_id = $request->input('brewery_id'); |
||||
|
if ($request->input('notes')) |
||||
|
{ |
||||
|
$beers->notes = $request->input('notes'); |
||||
|
} |
||||
|
$beers->save(); |
||||
|
|
||||
|
return redirect('/beers')->with('success', 'Beer Added'); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,57 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Yeast; |
||||
|
class YeastController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index() |
||||
|
{ |
||||
|
$yeasts = Yeast::orderBy('name')->get(); |
||||
|
return view('yeasts')->with('yeasts', $yeasts); |
||||
|
} |
||||
|
|
||||
|
public function store(Request $request){ |
||||
|
// validation
|
||||
|
$this->validate($request,[ |
||||
|
'name' => 'required', |
||||
|
]); |
||||
|
|
||||
|
|
||||
|
// create project
|
||||
|
$yeast = new Yeast; |
||||
|
$lastID = Yeast::orderBy('id','desc')->value('id'); |
||||
|
$yeast->id = number_format($lastID) + 1; |
||||
|
$yeast->name = $request->input('name'); |
||||
|
if ($request->input('attenuation')) |
||||
|
{ |
||||
|
$yeast->attenuation = $request->input('attenuation'); |
||||
|
} |
||||
|
if ($request->input('flocculation')) |
||||
|
{ |
||||
|
$yeast->flocculation = $request->input('flocculation'); |
||||
|
} |
||||
|
if ($request->input('profile')) |
||||
|
{ |
||||
|
$yeast->profile = '{'.$request->input('profile').'}'; |
||||
|
} |
||||
|
if ($request->input('tolerance')) |
||||
|
{ |
||||
|
$yeast->tolerance = $request->input('tolerance'); |
||||
|
} |
||||
|
if ($request->input('temp_range')) |
||||
|
{ |
||||
|
$yeast->temp_range = $request->input('temp_range'); |
||||
|
} |
||||
|
$yeast->save(); |
||||
|
|
||||
|
return redirect('/yeasts')->with('success', 'Yeast Added'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,40 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Controllers; |
||||
|
|
||||
|
use Illuminate\Http\Request; |
||||
|
use App\Models\Yeast; |
||||
|
use App\Models\Fermentation; |
||||
|
use Illuminate\Support\Facades\DB; |
||||
|
|
||||
|
class YeastcardController extends Controller |
||||
|
{ |
||||
|
public function __construct() |
||||
|
{ |
||||
|
$this->middleware('auth'); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public function index($yeastID) |
||||
|
{ |
||||
|
$yeast = DB::table('yeasts')->where('id', $yeastID)->first(); |
||||
|
$yeastadditions = Fermentation::where('yeast_id', $yeastID)->distinct('beer_id')->get(); |
||||
|
foreach ($yeastadditions as $yeasts) |
||||
|
{ |
||||
|
$beerName = DB::table('summaries')->where('beer_id', $yeasts->beer_id)->value('name'); |
||||
|
$breweryID = DB::table('summaries')->where('beer_id', $yeasts->beer_id)->value('brewery_id'); |
||||
|
$breweryName = DB::table('breweries')->where('id', $breweryID)->value('name'); |
||||
|
if($yeasts->alternative) { |
||||
|
$altname = DB::table('yeasts')->where('id', $yeasts->alternative)->value('name'); |
||||
|
$yeasts['altname']=$altname; |
||||
|
} |
||||
|
$yeasts['beer'] = $beerName; |
||||
|
$yeasts['breweryID'] = $breweryID; |
||||
|
$yeasts['brewery']=$breweryName; |
||||
|
} |
||||
|
$yeastadditions = $yeastadditions->sortBy('brewery'); |
||||
|
$data = array('yeast'=>$yeast, 'yeastadditions'=>$yeastadditions); |
||||
|
return view('yeast')->with($data); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,66 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http; |
||||
|
|
||||
|
use Illuminate\Foundation\Http\Kernel as HttpKernel; |
||||
|
|
||||
|
class Kernel extends HttpKernel |
||||
|
{ |
||||
|
/** |
||||
|
* The application's global HTTP middleware stack. |
||||
|
* |
||||
|
* These middleware are run during every request to your application. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $middleware = [ |
||||
|
// \App\Http\Middleware\TrustHosts::class,
|
||||
|
\App\Http\Middleware\TrustProxies::class, |
||||
|
\Fruitcake\Cors\HandleCors::class, |
||||
|
\App\Http\Middleware\PreventRequestsDuringMaintenance::class, |
||||
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, |
||||
|
\App\Http\Middleware\TrimStrings::class, |
||||
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, |
||||
|
]; |
||||
|
|
||||
|
/** |
||||
|
* The application's route middleware groups. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $middlewareGroups = [ |
||||
|
'web' => [ |
||||
|
\App\Http\Middleware\EncryptCookies::class, |
||||
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
||||
|
\Illuminate\Session\Middleware\StartSession::class, |
||||
|
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class, |
||||
|
\App\Http\Middleware\VerifyCsrfToken::class, |
||||
|
\Illuminate\Routing\Middleware\SubstituteBindings::class, |
||||
|
], |
||||
|
|
||||
|
'api' => [ |
||||
|
'throttle:api', |
||||
|
\Illuminate\Routing\Middleware\SubstituteBindings::class, |
||||
|
], |
||||
|
]; |
||||
|
|
||||
|
/** |
||||
|
* The application's route middleware. |
||||
|
* |
||||
|
* These middleware may be assigned to groups or used individually. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $routeMiddleware = [ |
||||
|
'auth' => \App\Http\Middleware\Authenticate::class, |
||||
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, |
||||
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, |
||||
|
'can' => \Illuminate\Auth\Middleware\Authorize::class, |
||||
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, |
||||
|
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, |
||||
|
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, |
||||
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, |
||||
|
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, |
||||
|
]; |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Middleware; |
||||
|
|
||||
|
use Illuminate\Auth\Middleware\Authenticate as Middleware; |
||||
|
|
||||
|
class Authenticate extends Middleware |
||||
|
{ |
||||
|
/** |
||||
|
* Get the path the user should be redirected to when they are not authenticated. |
||||
|
* |
||||
|
* @param \Illuminate\Http\Request $request |
||||
|
* @return string|null |
||||
|
*/ |
||||
|
protected function redirectTo($request) |
||||
|
{ |
||||
|
if (! $request->expectsJson()) { |
||||
|
return route('login'); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Middleware; |
||||
|
|
||||
|
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; |
||||
|
|
||||
|
class EncryptCookies extends Middleware |
||||
|
{ |
||||
|
/** |
||||
|
* The names of the cookies that should not be encrypted. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $except = [ |
||||
|
//
|
||||
|
]; |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Middleware; |
||||
|
|
||||
|
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware; |
||||
|
|
||||
|
class PreventRequestsDuringMaintenance extends Middleware |
||||
|
{ |
||||
|
/** |
||||
|
* The URIs that should be reachable while maintenance mode is enabled. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $except = [ |
||||
|
//
|
||||
|
]; |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Middleware; |
||||
|
|
||||
|
use App\Providers\RouteServiceProvider; |
||||
|
use Closure; |
||||
|
use Illuminate\Http\Request; |
||||
|
use Illuminate\Support\Facades\Auth; |
||||
|
|
||||
|
class RedirectIfAuthenticated |
||||
|
{ |
||||
|
/** |
||||
|
* Handle an incoming request. |
||||
|
* |
||||
|
* @param \Illuminate\Http\Request $request |
||||
|
* @param \Closure $next |
||||
|
* @param string|null ...$guards |
||||
|
* @return mixed |
||||
|
*/ |
||||
|
public function handle(Request $request, Closure $next, ...$guards) |
||||
|
{ |
||||
|
$guards = empty($guards) ? [null] : $guards; |
||||
|
|
||||
|
foreach ($guards as $guard) { |
||||
|
if (Auth::guard($guard)->check()) { |
||||
|
return redirect(RouteServiceProvider::HOME); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return $next($request); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Middleware; |
||||
|
|
||||
|
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; |
||||
|
|
||||
|
class TrimStrings extends Middleware |
||||
|
{ |
||||
|
/** |
||||
|
* The names of the attributes that should not be trimmed. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $except = [ |
||||
|
'current_password', |
||||
|
'password', |
||||
|
'password_confirmation', |
||||
|
]; |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Middleware; |
||||
|
|
||||
|
use Illuminate\Http\Middleware\TrustHosts as Middleware; |
||||
|
|
||||
|
class TrustHosts extends Middleware |
||||
|
{ |
||||
|
/** |
||||
|
* Get the host patterns that should be trusted. |
||||
|
* |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function hosts() |
||||
|
{ |
||||
|
return [ |
||||
|
$this->allSubdomainsOfApplicationUrl(), |
||||
|
]; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Middleware; |
||||
|
|
||||
|
use Fideloper\Proxy\TrustProxies as Middleware; |
||||
|
use Illuminate\Http\Request; |
||||
|
|
||||
|
class TrustProxies extends Middleware |
||||
|
{ |
||||
|
/** |
||||
|
* The trusted proxies for this application. |
||||
|
* |
||||
|
* @var array|string|null |
||||
|
*/ |
||||
|
protected $proxies; |
||||
|
|
||||
|
/** |
||||
|
* The headers that should be used to detect proxies. |
||||
|
* |
||||
|
* @var int |
||||
|
*/ |
||||
|
protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB; |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Http\Middleware; |
||||
|
|
||||
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; |
||||
|
|
||||
|
class VerifyCsrfToken extends Middleware |
||||
|
{ |
||||
|
/** |
||||
|
* The URIs that should be excluded from CSRF verification. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $except = [ |
||||
|
//
|
||||
|
]; |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Leann extends Model |
||||
|
{ |
||||
|
|
||||
|
/** |
||||
|
* The attributes that should be mutated to dates. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $dates = [ |
||||
|
'created_at', |
||||
|
'updated__at', |
||||
|
]; |
||||
|
|
||||
|
protected $fillable = ['name','description']; |
||||
|
|
||||
|
protected $visible = [ |
||||
|
'id', |
||||
|
'user_id', |
||||
|
'name', |
||||
|
'description', |
||||
|
]; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
@ -0,0 +1,13 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Adjunct extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Adjunctaddition extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Brewerie extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
|
||||
|
protected $fillable = [ |
||||
|
'id', 'name', 'place', 'country' |
||||
|
]; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Edit extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Fermentation extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Grain extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Grainbill extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Hop extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Hopaddition extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
protected $casts = [ |
||||
|
'profile' => 'array', |
||||
|
]; |
||||
|
public $timestamps = false; |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Leann extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Mashe extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Summarie extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
protected $primaryKey = 'beer_id'; |
||||
|
} |
||||
@ -0,0 +1,52 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Contracts\Auth\MustVerifyEmail; |
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Foundation\Auth\User as Authenticatable; |
||||
|
use Illuminate\Notifications\Notifiable; |
||||
|
|
||||
|
class User extends Authenticatable |
||||
|
{ |
||||
|
use HasFactory, Notifiable; |
||||
|
|
||||
|
/** |
||||
|
* The attributes that are mass assignable. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $fillable = [ |
||||
|
'name', |
||||
|
'email', |
||||
|
'username', |
||||
|
'password', |
||||
|
]; |
||||
|
|
||||
|
/** |
||||
|
* The attributes that should be hidden for arrays. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $hidden = [ |
||||
|
'password', |
||||
|
'remember_token', |
||||
|
]; |
||||
|
|
||||
|
/** |
||||
|
* The attributes that should be cast to native types. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $casts = [ |
||||
|
'email_verified_at' => 'datetime', |
||||
|
]; |
||||
|
|
||||
|
|
||||
|
public function isAdmin() { |
||||
|
if($this->is_admin){ |
||||
|
return true; |
||||
|
} |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class Yeast extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
public $timestamps = false; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Providers; |
||||
|
|
||||
|
use Illuminate\Support\ServiceProvider; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
class AppServiceProvider extends ServiceProvider |
||||
|
{ |
||||
|
/** |
||||
|
* Register any application services. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function register() |
||||
|
{ |
||||
|
//
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Bootstrap any application services. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function boot() |
||||
|
{ |
||||
|
Schema::defaultStringLength(191); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Providers; |
||||
|
|
||||
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; |
||||
|
use Illuminate\Support\Facades\Gate; |
||||
|
|
||||
|
class AuthServiceProvider extends ServiceProvider |
||||
|
{ |
||||
|
/** |
||||
|
* The policy mappings for the application. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $policies = [ |
||||
|
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
||||
|
]; |
||||
|
|
||||
|
/** |
||||
|
* Register any authentication / authorization services. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function boot() |
||||
|
{ |
||||
|
$this->registerPolicies(); |
||||
|
|
||||
|
//
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Providers; |
||||
|
|
||||
|
use Illuminate\Support\Facades\Broadcast; |
||||
|
use Illuminate\Support\ServiceProvider; |
||||
|
|
||||
|
class BroadcastServiceProvider extends ServiceProvider |
||||
|
{ |
||||
|
/** |
||||
|
* Bootstrap any application services. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function boot() |
||||
|
{ |
||||
|
Broadcast::routes(); |
||||
|
|
||||
|
require base_path('routes/channels.php'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Providers; |
||||
|
|
||||
|
use Illuminate\Auth\Events\Registered; |
||||
|
use Illuminate\Auth\Listeners\SendEmailVerificationNotification; |
||||
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; |
||||
|
use Illuminate\Support\Facades\Event; |
||||
|
|
||||
|
class EventServiceProvider extends ServiceProvider |
||||
|
{ |
||||
|
/** |
||||
|
* The event listener mappings for the application. |
||||
|
* |
||||
|
* @var array |
||||
|
*/ |
||||
|
protected $listen = [ |
||||
|
Registered::class => [ |
||||
|
SendEmailVerificationNotification::class, |
||||
|
], |
||||
|
]; |
||||
|
|
||||
|
/** |
||||
|
* Register any events for your application. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function boot() |
||||
|
{ |
||||
|
//
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,63 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Providers; |
||||
|
|
||||
|
use Illuminate\Cache\RateLimiting\Limit; |
||||
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
||||
|
use Illuminate\Http\Request; |
||||
|
use Illuminate\Support\Facades\RateLimiter; |
||||
|
use Illuminate\Support\Facades\Route; |
||||
|
|
||||
|
class RouteServiceProvider extends ServiceProvider |
||||
|
{ |
||||
|
/** |
||||
|
* The path to the "home" route for your application. |
||||
|
* |
||||
|
* This is used by Laravel authentication to redirect users after login. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
public const HOME = '/home'; |
||||
|
|
||||
|
/** |
||||
|
* The controller namespace for the application. |
||||
|
* |
||||
|
* When present, controller route declarations will automatically be prefixed with this namespace. |
||||
|
* |
||||
|
* @var string|null |
||||
|
*/ |
||||
|
// protected $namespace = 'App\\Http\\Controllers';
|
||||
|
|
||||
|
/** |
||||
|
* Define your route model bindings, pattern filters, etc. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function boot() |
||||
|
{ |
||||
|
$this->configureRateLimiting(); |
||||
|
|
||||
|
$this->routes(function () { |
||||
|
Route::prefix('api') |
||||
|
->middleware('api') |
||||
|
->namespace($this->namespace) |
||||
|
->group(base_path('routes/api.php')); |
||||
|
|
||||
|
Route::middleware('web') |
||||
|
->namespace($this->namespace) |
||||
|
->group(base_path('routes/web.php')); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Configure the rate limiters for the application. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
protected function configureRateLimiting() |
||||
|
{ |
||||
|
RateLimiter::for('api', function (Request $request) { |
||||
|
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,53 @@ |
|||||
|
#!/usr/bin/env php |
||||
|
<?php |
||||
|
|
||||
|
define('LARAVEL_START', microtime(true)); |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Register The Auto Loader |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Composer provides a convenient, automatically generated class loader |
||||
|
| for our application. We just need to utilize it! We'll require it |
||||
|
| into the script here so that we do not have to worry about the |
||||
|
| loading of any of our classes manually. It's great to relax. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
require __DIR__.'/vendor/autoload.php'; |
||||
|
|
||||
|
$app = require_once __DIR__.'/bootstrap/app.php'; |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Run The Artisan Application |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| When we run the console application, the current CLI command will be |
||||
|
| executed in this console and the response sent back to a terminal |
||||
|
| or another output device for the developers. Here goes nothing! |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); |
||||
|
|
||||
|
$status = $kernel->handle( |
||||
|
$input = new Symfony\Component\Console\Input\ArgvInput, |
||||
|
new Symfony\Component\Console\Output\ConsoleOutput |
||||
|
); |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Shutdown The Application |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Once Artisan has finished running, we will fire off the shutdown events |
||||
|
| so that any final work may be done by the application before we shut |
||||
|
| down the process. This is the last thing to happen to the request. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
$kernel->terminate($input, $status); |
||||
|
|
||||
|
exit($status); |
||||
@ -0,0 +1,55 @@ |
|||||
|
<?php |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Create The Application |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| The first thing we will do is create a new Laravel application instance |
||||
|
| which serves as the "glue" for all the components of Laravel, and is |
||||
|
| the IoC container for the system binding all of the various parts. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
$app = new Illuminate\Foundation\Application( |
||||
|
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) |
||||
|
); |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Bind Important Interfaces |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Next, we need to bind some important interfaces into the container so |
||||
|
| we will be able to resolve them when needed. The kernels serve the |
||||
|
| incoming requests to this application from both the web and CLI. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
$app->singleton( |
||||
|
Illuminate\Contracts\Http\Kernel::class, |
||||
|
App\Http\Kernel::class |
||||
|
); |
||||
|
|
||||
|
$app->singleton( |
||||
|
Illuminate\Contracts\Console\Kernel::class, |
||||
|
App\Console\Kernel::class |
||||
|
); |
||||
|
|
||||
|
$app->singleton( |
||||
|
Illuminate\Contracts\Debug\ExceptionHandler::class, |
||||
|
App\Exceptions\Handler::class |
||||
|
); |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Return The Application |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This script returns the application instance. The instance is given to |
||||
|
| the calling script so we can separate the building of the instances |
||||
|
| from the actual running of the application and sending responses. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
return $app; |
||||
@ -0,0 +1,2 @@ |
|||||
|
* |
||||
|
!.gitignore |
||||
@ -0,0 +1,65 @@ |
|||||
|
{ |
||||
|
"name": "laravel/laravel", |
||||
|
"type": "project", |
||||
|
"description": "The Laravel Framework.", |
||||
|
"keywords": ["framework", "laravel"], |
||||
|
"license": "MIT", |
||||
|
"require": { |
||||
|
"php": "^7.3|^8.0", |
||||
|
"fideloper/proxy": "^4.4", |
||||
|
"fruitcake/laravel-cors": "^2.0", |
||||
|
"guzzlehttp/guzzle": "^7.0.1", |
||||
|
"laravel/framework": "^8.40", |
||||
|
"laravel/tinker": "^2.5", |
||||
|
"laravel/ui": "^3.3" |
||||
|
}, |
||||
|
"require-dev": { |
||||
|
"facade/ignition": "^2.5", |
||||
|
"fakerphp/faker": "^1.9.1", |
||||
|
"kitloong/laravel-migrations-generator": "^4.4", |
||||
|
"krlove/eloquent-model-generator": "^1.3", |
||||
|
"laravel/sail": "^1.0.1", |
||||
|
"mockery/mockery": "^1.4.2", |
||||
|
"nunomaduro/collision": "^5.0", |
||||
|
"phpunit/phpunit": "^9.3.3" |
||||
|
}, |
||||
|
"autoload": { |
||||
|
"psr-4": { |
||||
|
"App\\": "app/", |
||||
|
"Database\\Factories\\": "database/factories/", |
||||
|
"Database\\Seeders\\": "database/seeders/" |
||||
|
}, |
||||
|
"files": [ |
||||
|
"app/Helpers/Go_back_link.php" |
||||
|
] |
||||
|
}, |
||||
|
"autoload-dev": { |
||||
|
"psr-4": { |
||||
|
"Tests\\": "tests/" |
||||
|
} |
||||
|
}, |
||||
|
"scripts": { |
||||
|
"post-autoload-dump": [ |
||||
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", |
||||
|
"@php artisan package:discover --ansi" |
||||
|
], |
||||
|
"post-root-package-install": [ |
||||
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" |
||||
|
], |
||||
|
"post-create-project-cmd": [ |
||||
|
"@php artisan key:generate --ansi" |
||||
|
] |
||||
|
}, |
||||
|
"extra": { |
||||
|
"laravel": { |
||||
|
"dont-discover": [] |
||||
|
} |
||||
|
}, |
||||
|
"config": { |
||||
|
"optimize-autoloader": true, |
||||
|
"preferred-install": "dist", |
||||
|
"sort-packages": true |
||||
|
}, |
||||
|
"minimum-stability": "dev", |
||||
|
"prefer-stable": true |
||||
|
} |
||||
7885
composer.lock
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,233 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Application Name |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This value is the name of your application. This value is used when the |
||||
|
| framework needs to place the application's name in a notification or |
||||
|
| any other location as required by the application or its packages. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'name' => env('APP_NAME', 'Laravel'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Application Environment |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This value determines the "environment" your application is currently |
||||
|
| running in. This may determine how you prefer to configure various |
||||
|
| services the application utilizes. Set this in your ".env" file. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'env' => env('APP_ENV', 'production'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Application Debug Mode |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| When your application is in debug mode, detailed error messages with |
||||
|
| stack traces will be shown on every error that occurs within your |
||||
|
| application. If disabled, a simple generic error page is shown. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'debug' => (bool) env('APP_DEBUG', false), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Application URL |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This URL is used by the console to properly generate URLs when using |
||||
|
| the Artisan command line tool. You should set this to the root of |
||||
|
| your application so that it is used when running Artisan tasks. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'url' => env('APP_URL', 'http://localhost'), |
||||
|
|
||||
|
'asset_url' => env('ASSET_URL', null), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Application Timezone |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may specify the default timezone for your application, which |
||||
|
| will be used by the PHP date and date-time functions. We have gone |
||||
|
| ahead and set this to a sensible default for you out of the box. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'timezone' => 'UTC', |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Application Locale Configuration |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| The application locale determines the default locale that will be used |
||||
|
| by the translation service provider. You are free to set this value |
||||
|
| to any of the locales which will be supported by the application. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'locale' => 'en', |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Application Fallback Locale |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| The fallback locale determines the locale to use when the current one |
||||
|
| is not available. You may change the value to correspond to any of |
||||
|
| the language folders that are provided through your application. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'fallback_locale' => 'en', |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Faker Locale |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This locale will be used by the Faker PHP library when generating fake |
||||
|
| data for your database seeds. For example, this will be used to get |
||||
|
| localized telephone numbers, street address information and more. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'faker_locale' => 'en_US', |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Encryption Key |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This key is used by the Illuminate encrypter service and should be set |
||||
|
| to a random, 32 character string, otherwise these encrypted strings |
||||
|
| will not be safe. Please do this before deploying an application! |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'key' => env('APP_KEY'), |
||||
|
|
||||
|
'cipher' => 'AES-256-CBC', |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Autoloaded Service Providers |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| The service providers listed here will be automatically loaded on the |
||||
|
| request to your application. Feel free to add your own services to |
||||
|
| this array to grant expanded functionality to your applications. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'providers' => [ |
||||
|
|
||||
|
/* |
||||
|
* Laravel Framework Service Providers... |
||||
|
*/ |
||||
|
Illuminate\Auth\AuthServiceProvider::class, |
||||
|
Illuminate\Broadcasting\BroadcastServiceProvider::class, |
||||
|
Illuminate\Bus\BusServiceProvider::class, |
||||
|
Illuminate\Cache\CacheServiceProvider::class, |
||||
|
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, |
||||
|
Illuminate\Cookie\CookieServiceProvider::class, |
||||
|
Illuminate\Database\DatabaseServiceProvider::class, |
||||
|
Illuminate\Encryption\EncryptionServiceProvider::class, |
||||
|
Illuminate\Filesystem\FilesystemServiceProvider::class, |
||||
|
Illuminate\Foundation\Providers\FoundationServiceProvider::class, |
||||
|
Illuminate\Hashing\HashServiceProvider::class, |
||||
|
Illuminate\Mail\MailServiceProvider::class, |
||||
|
Illuminate\Notifications\NotificationServiceProvider::class, |
||||
|
Illuminate\Pagination\PaginationServiceProvider::class, |
||||
|
Illuminate\Pipeline\PipelineServiceProvider::class, |
||||
|
Illuminate\Queue\QueueServiceProvider::class, |
||||
|
Illuminate\Redis\RedisServiceProvider::class, |
||||
|
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, |
||||
|
Illuminate\Session\SessionServiceProvider::class, |
||||
|
Illuminate\Translation\TranslationServiceProvider::class, |
||||
|
Illuminate\Validation\ValidationServiceProvider::class, |
||||
|
Illuminate\View\ViewServiceProvider::class, |
||||
|
|
||||
|
/* |
||||
|
* Package Service Providers... |
||||
|
*/ |
||||
|
|
||||
|
/* |
||||
|
* Application Service Providers... |
||||
|
*/ |
||||
|
App\Providers\AppServiceProvider::class, |
||||
|
App\Providers\AuthServiceProvider::class, |
||||
|
// App\Providers\BroadcastServiceProvider::class,
|
||||
|
App\Providers\EventServiceProvider::class, |
||||
|
App\Providers\RouteServiceProvider::class, |
||||
|
|
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Class Aliases |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This array of class aliases will be registered when this application |
||||
|
| is started. However, feel free to register as many as you wish as |
||||
|
| the aliases are "lazy" loaded so they don't hinder performance. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'aliases' => [ |
||||
|
|
||||
|
'App' => Illuminate\Support\Facades\App::class, |
||||
|
'Arr' => Illuminate\Support\Arr::class, |
||||
|
'Artisan' => Illuminate\Support\Facades\Artisan::class, |
||||
|
'Auth' => Illuminate\Support\Facades\Auth::class, |
||||
|
'Blade' => Illuminate\Support\Facades\Blade::class, |
||||
|
'Broadcast' => Illuminate\Support\Facades\Broadcast::class, |
||||
|
'Bus' => Illuminate\Support\Facades\Bus::class, |
||||
|
'Cache' => Illuminate\Support\Facades\Cache::class, |
||||
|
'Config' => Illuminate\Support\Facades\Config::class, |
||||
|
'Cookie' => Illuminate\Support\Facades\Cookie::class, |
||||
|
'Crypt' => Illuminate\Support\Facades\Crypt::class, |
||||
|
'Date' => Illuminate\Support\Facades\Date::class, |
||||
|
'DB' => Illuminate\Support\Facades\DB::class, |
||||
|
'Eloquent' => Illuminate\Database\Eloquent\Model::class, |
||||
|
'Event' => Illuminate\Support\Facades\Event::class, |
||||
|
'File' => Illuminate\Support\Facades\File::class, |
||||
|
'Gate' => Illuminate\Support\Facades\Gate::class, |
||||
|
'Hash' => Illuminate\Support\Facades\Hash::class, |
||||
|
'Http' => Illuminate\Support\Facades\Http::class, |
||||
|
'Lang' => Illuminate\Support\Facades\Lang::class, |
||||
|
'Log' => Illuminate\Support\Facades\Log::class, |
||||
|
'Mail' => Illuminate\Support\Facades\Mail::class, |
||||
|
'Notification' => Illuminate\Support\Facades\Notification::class, |
||||
|
'Password' => Illuminate\Support\Facades\Password::class, |
||||
|
'Queue' => Illuminate\Support\Facades\Queue::class, |
||||
|
'Redirect' => Illuminate\Support\Facades\Redirect::class, |
||||
|
// 'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
|
'Request' => Illuminate\Support\Facades\Request::class, |
||||
|
'Response' => Illuminate\Support\Facades\Response::class, |
||||
|
'Route' => Illuminate\Support\Facades\Route::class, |
||||
|
'Schema' => Illuminate\Support\Facades\Schema::class, |
||||
|
'Session' => Illuminate\Support\Facades\Session::class, |
||||
|
'Storage' => Illuminate\Support\Facades\Storage::class, |
||||
|
'Str' => Illuminate\Support\Str::class, |
||||
|
'URL' => Illuminate\Support\Facades\URL::class, |
||||
|
'Validator' => Illuminate\Support\Facades\Validator::class, |
||||
|
'View' => Illuminate\Support\Facades\View::class, |
||||
|
|
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,117 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Authentication Defaults |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option controls the default authentication "guard" and password |
||||
|
| reset options for your application. You may change these defaults |
||||
|
| as required, but they're a perfect start for most applications. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'defaults' => [ |
||||
|
'guard' => 'web', |
||||
|
'passwords' => 'users', |
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Authentication Guards |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Next, you may define every authentication guard for your application. |
||||
|
| Of course, a great default configuration has been defined for you |
||||
|
| here which uses session storage and the Eloquent user provider. |
||||
|
| |
||||
|
| All authentication drivers have a user provider. This defines how the |
||||
|
| users are actually retrieved out of your database or other storage |
||||
|
| mechanisms used by this application to persist your user's data. |
||||
|
| |
||||
|
| Supported: "session", "token" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'guards' => [ |
||||
|
'web' => [ |
||||
|
'driver' => 'session', |
||||
|
'provider' => 'users', |
||||
|
], |
||||
|
|
||||
|
'api' => [ |
||||
|
'driver' => 'token', |
||||
|
'provider' => 'users', |
||||
|
'hash' => false, |
||||
|
], |
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| User Providers |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| All authentication drivers have a user provider. This defines how the |
||||
|
| users are actually retrieved out of your database or other storage |
||||
|
| mechanisms used by this application to persist your user's data. |
||||
|
| |
||||
|
| If you have multiple user tables or models you may configure multiple |
||||
|
| sources which represent each model / table. These sources may then |
||||
|
| be assigned to any extra authentication guards you have defined. |
||||
|
| |
||||
|
| Supported: "database", "eloquent" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'providers' => [ |
||||
|
'users' => [ |
||||
|
'driver' => 'eloquent', |
||||
|
'model' => App\Models\User::class, |
||||
|
], |
||||
|
|
||||
|
// 'users' => [
|
||||
|
// 'driver' => 'database',
|
||||
|
// 'table' => 'users',
|
||||
|
// ],
|
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Resetting Passwords |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| You may specify multiple password reset configurations if you have more |
||||
|
| than one user table or model in the application and you want to have |
||||
|
| separate password reset settings based on the specific user types. |
||||
|
| |
||||
|
| The expire time is the number of minutes that the reset token should be |
||||
|
| considered valid. This security feature keeps tokens short-lived so |
||||
|
| they have less time to be guessed. You may change this as needed. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'passwords' => [ |
||||
|
'users' => [ |
||||
|
'provider' => 'users', |
||||
|
'table' => 'password_resets', |
||||
|
'expire' => 60, |
||||
|
'throttle' => 60, |
||||
|
], |
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Password Confirmation Timeout |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may define the amount of seconds before a password confirmation |
||||
|
| times out and the user is prompted to re-enter their password via the |
||||
|
| confirmation screen. By default, the timeout lasts for three hours. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'password_timeout' => 10800, |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,64 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Default Broadcaster |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option controls the default broadcaster that will be used by the |
||||
|
| framework when an event needs to be broadcast. You may set this to |
||||
|
| any of the connections defined in the "connections" array below. |
||||
|
| |
||||
|
| Supported: "pusher", "ably", "redis", "log", "null" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'default' => env('BROADCAST_DRIVER', 'null'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Broadcast Connections |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may define all of the broadcast connections that will be used |
||||
|
| to broadcast events to other systems or over websockets. Samples of |
||||
|
| each available type of connection are provided inside this array. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'connections' => [ |
||||
|
|
||||
|
'pusher' => [ |
||||
|
'driver' => 'pusher', |
||||
|
'key' => env('PUSHER_APP_KEY'), |
||||
|
'secret' => env('PUSHER_APP_SECRET'), |
||||
|
'app_id' => env('PUSHER_APP_ID'), |
||||
|
'options' => [ |
||||
|
'cluster' => env('PUSHER_APP_CLUSTER'), |
||||
|
'useTLS' => true, |
||||
|
], |
||||
|
], |
||||
|
|
||||
|
'ably' => [ |
||||
|
'driver' => 'ably', |
||||
|
'key' => env('ABLY_KEY'), |
||||
|
], |
||||
|
|
||||
|
'redis' => [ |
||||
|
'driver' => 'redis', |
||||
|
'connection' => 'default', |
||||
|
], |
||||
|
|
||||
|
'log' => [ |
||||
|
'driver' => 'log', |
||||
|
], |
||||
|
|
||||
|
'null' => [ |
||||
|
'driver' => 'null', |
||||
|
], |
||||
|
|
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,110 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Support\Str; |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Default Cache Store |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option controls the default cache connection that gets used while |
||||
|
| using this caching library. This connection is used when another is |
||||
|
| not explicitly specified when executing a given caching function. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'default' => env('CACHE_DRIVER', 'file'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Cache Stores |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may define all of the cache "stores" for your application as |
||||
|
| well as their drivers. You may even define multiple stores for the |
||||
|
| same cache driver to group types of items stored in your caches. |
||||
|
| |
||||
|
| Supported drivers: "apc", "array", "database", "file", |
||||
|
| "memcached", "redis", "dynamodb", "octane", "null" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'stores' => [ |
||||
|
|
||||
|
'apc' => [ |
||||
|
'driver' => 'apc', |
||||
|
], |
||||
|
|
||||
|
'array' => [ |
||||
|
'driver' => 'array', |
||||
|
'serialize' => false, |
||||
|
], |
||||
|
|
||||
|
'database' => [ |
||||
|
'driver' => 'database', |
||||
|
'table' => 'cache', |
||||
|
'connection' => null, |
||||
|
'lock_connection' => null, |
||||
|
], |
||||
|
|
||||
|
'file' => [ |
||||
|
'driver' => 'file', |
||||
|
'path' => storage_path('framework/cache/data'), |
||||
|
], |
||||
|
|
||||
|
'memcached' => [ |
||||
|
'driver' => 'memcached', |
||||
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), |
||||
|
'sasl' => [ |
||||
|
env('MEMCACHED_USERNAME'), |
||||
|
env('MEMCACHED_PASSWORD'), |
||||
|
], |
||||
|
'options' => [ |
||||
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
|
], |
||||
|
'servers' => [ |
||||
|
[ |
||||
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'), |
||||
|
'port' => env('MEMCACHED_PORT', 11211), |
||||
|
'weight' => 100, |
||||
|
], |
||||
|
], |
||||
|
], |
||||
|
|
||||
|
'redis' => [ |
||||
|
'driver' => 'redis', |
||||
|
'connection' => 'cache', |
||||
|
'lock_connection' => 'default', |
||||
|
], |
||||
|
|
||||
|
'dynamodb' => [ |
||||
|
'driver' => 'dynamodb', |
||||
|
'key' => env('AWS_ACCESS_KEY_ID'), |
||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), |
||||
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), |
||||
|
'endpoint' => env('DYNAMODB_ENDPOINT'), |
||||
|
], |
||||
|
|
||||
|
'octane' => [ |
||||
|
'driver' => 'octane', |
||||
|
], |
||||
|
|
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Cache Key Prefix |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| When utilizing a RAM based store such as APC or Memcached, there might |
||||
|
| be other applications utilizing the same cache. So, we'll specify a |
||||
|
| value to get prefixed to all our keys so we can avoid collisions. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,34 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Cross-Origin Resource Sharing (CORS) Configuration |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may configure your settings for cross-origin resource sharing |
||||
|
| or "CORS". This determines what cross-origin operations may execute |
||||
|
| in web browsers. You are free to adjust these settings as needed. |
||||
|
| |
||||
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'paths' => ['api/*', 'sanctum/csrf-cookie'], |
||||
|
|
||||
|
'allowed_methods' => ['*'], |
||||
|
|
||||
|
'allowed_origins' => ['*'], |
||||
|
|
||||
|
'allowed_origins_patterns' => [], |
||||
|
|
||||
|
'allowed_headers' => ['*'], |
||||
|
|
||||
|
'exposed_headers' => [], |
||||
|
|
||||
|
'max_age' => 0, |
||||
|
|
||||
|
'supports_credentials' => false, |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,147 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Support\Str; |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Default Database Connection Name |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may specify which of the database connections below you wish |
||||
|
| to use as your default connection for all database work. Of course |
||||
|
| you may use many connections at once using the Database library. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'default' => env('DB_CONNECTION', 'pgsql'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Database Connections |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here are each of the database connections setup for your application. |
||||
|
| Of course, examples of configuring each database platform that is |
||||
|
| supported by Laravel is shown below to make development simple. |
||||
|
| |
||||
|
| |
||||
|
| All database work in Laravel is done through the PHP PDO facilities |
||||
|
| so make sure you have the driver for your particular database of |
||||
|
| choice installed on your machine before you begin development. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'connections' => [ |
||||
|
|
||||
|
'sqlite' => [ |
||||
|
'driver' => 'sqlite', |
||||
|
'url' => env('DATABASE_URL'), |
||||
|
'database' => env('DB_DATABASE', database_path('database.sqlite')), |
||||
|
'prefix' => '', |
||||
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), |
||||
|
], |
||||
|
|
||||
|
'mysql' => [ |
||||
|
'driver' => 'mysql', |
||||
|
'url' => env('DATABASE_URL'), |
||||
|
'host' => env('DB_HOST', '127.0.0.1'), |
||||
|
'port' => env('DB_PORT', '3306'), |
||||
|
'database' => env('DB_DATABASE', 'forge'), |
||||
|
'username' => env('DB_USERNAME', 'forge'), |
||||
|
'password' => env('DB_PASSWORD', ''), |
||||
|
'unix_socket' => env('DB_SOCKET', ''), |
||||
|
'charset' => 'utf8mb4', |
||||
|
'collation' => 'utf8mb4_unicode_ci', |
||||
|
'prefix' => '', |
||||
|
'prefix_indexes' => true, |
||||
|
'strict' => true, |
||||
|
'engine' => null, |
||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([ |
||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), |
||||
|
]) : [], |
||||
|
], |
||||
|
|
||||
|
'pgsql' => [ |
||||
|
'driver' => 'pgsql', |
||||
|
'url' => env('DATABASE_URL'), |
||||
|
'host' => env('DB_HOST', '127.0.0.1'), |
||||
|
'port' => env('DB_PORT', '5432'), |
||||
|
'database' => env('DB_DATABASE', 'forge'), |
||||
|
'username' => env('DB_USERNAME', 'forge'), |
||||
|
'password' => env('DB_PASSWORD', ''), |
||||
|
'charset' => 'utf8', |
||||
|
'prefix' => '', |
||||
|
'prefix_indexes' => true, |
||||
|
'schema' => 'public', |
||||
|
'sslmode' => 'prefer', |
||||
|
], |
||||
|
|
||||
|
'sqlsrv' => [ |
||||
|
'driver' => 'sqlsrv', |
||||
|
'url' => env('DATABASE_URL'), |
||||
|
'host' => env('DB_HOST', 'localhost'), |
||||
|
'port' => env('DB_PORT', '1433'), |
||||
|
'database' => env('DB_DATABASE', 'forge'), |
||||
|
'username' => env('DB_USERNAME', 'forge'), |
||||
|
'password' => env('DB_PASSWORD', ''), |
||||
|
'charset' => 'utf8', |
||||
|
'prefix' => '', |
||||
|
'prefix_indexes' => true, |
||||
|
], |
||||
|
|
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Migration Repository Table |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This table keeps track of all the migrations that have already run for |
||||
|
| your application. Using this information, we can determine which of |
||||
|
| the migrations on disk haven't actually been run in the database. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'migrations' => 'migrations', |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Redis Databases |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Redis is an open source, fast, and advanced key-value store that also |
||||
|
| provides a richer body of commands than a typical key-value system |
||||
|
| such as APC or Memcached. Laravel makes it easy to dig right in. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'redis' => [ |
||||
|
|
||||
|
'client' => env('REDIS_CLIENT', 'phpredis'), |
||||
|
|
||||
|
'options' => [ |
||||
|
'cluster' => env('REDIS_CLUSTER', 'redis'), |
||||
|
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), |
||||
|
], |
||||
|
|
||||
|
'default' => [ |
||||
|
'url' => env('REDIS_URL'), |
||||
|
'host' => env('REDIS_HOST', '127.0.0.1'), |
||||
|
'password' => env('REDIS_PASSWORD', null), |
||||
|
'port' => env('REDIS_PORT', '6379'), |
||||
|
'database' => env('REDIS_DB', '0'), |
||||
|
], |
||||
|
|
||||
|
'cache' => [ |
||||
|
'url' => env('REDIS_URL'), |
||||
|
'host' => env('REDIS_HOST', '127.0.0.1'), |
||||
|
'password' => env('REDIS_PASSWORD', null), |
||||
|
'port' => env('REDIS_PORT', '6379'), |
||||
|
'database' => env('REDIS_CACHE_DB', '1'), |
||||
|
], |
||||
|
|
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,11 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
'model_defaults' => [ |
||||
|
'db_types' => [ |
||||
|
'_text' => 'string', |
||||
|
], |
||||
|
], |
||||
|
]; |
||||
|
|
||||
|
?>
|
||||
@ -0,0 +1,73 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Default Filesystem Disk |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may specify the default filesystem disk that should be used |
||||
|
| by the framework. The "local" disk, as well as a variety of cloud |
||||
|
| based disks are available to your application. Just store away! |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'default' => env('FILESYSTEM_DRIVER', 'local'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Filesystem Disks |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may configure as many filesystem "disks" as you wish, and you |
||||
|
| may even configure multiple disks of the same driver. Defaults have |
||||
|
| been setup for each driver as an example of the required options. |
||||
|
| |
||||
|
| Supported Drivers: "local", "ftp", "sftp", "s3" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'disks' => [ |
||||
|
|
||||
|
'local' => [ |
||||
|
'driver' => 'local', |
||||
|
'root' => storage_path('app'), |
||||
|
], |
||||
|
|
||||
|
'public' => [ |
||||
|
'driver' => 'local', |
||||
|
'root' => storage_path('app/public'), |
||||
|
'url' => env('APP_URL').'/storage', |
||||
|
'visibility' => 'public', |
||||
|
], |
||||
|
|
||||
|
's3' => [ |
||||
|
'driver' => 's3', |
||||
|
'key' => env('AWS_ACCESS_KEY_ID'), |
||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
||||
|
'region' => env('AWS_DEFAULT_REGION'), |
||||
|
'bucket' => env('AWS_BUCKET'), |
||||
|
'url' => env('AWS_URL'), |
||||
|
'endpoint' => env('AWS_ENDPOINT'), |
||||
|
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), |
||||
|
], |
||||
|
|
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Symbolic Links |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may configure the symbolic links that will be created when the |
||||
|
| `storage:link` Artisan command is executed. The array keys should be |
||||
|
| the locations of the links and the values should be their targets. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'links' => [ |
||||
|
public_path('storage') => storage_path('app/public'), |
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,52 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Default Hash Driver |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option controls the default hash driver that will be used to hash |
||||
|
| passwords for your application. By default, the bcrypt algorithm is |
||||
|
| used; however, you remain free to modify this option if you wish. |
||||
|
| |
||||
|
| Supported: "bcrypt", "argon", "argon2id" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'driver' => 'bcrypt', |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Bcrypt Options |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may specify the configuration options that should be used when |
||||
|
| passwords are hashed using the Bcrypt algorithm. This will allow you |
||||
|
| to control the amount of time it takes to hash the given password. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'bcrypt' => [ |
||||
|
'rounds' => env('BCRYPT_ROUNDS', 10), |
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Argon Options |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may specify the configuration options that should be used when |
||||
|
| passwords are hashed using the Argon algorithm. These will allow you |
||||
|
| to control the amount of time it takes to hash the given password. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'argon' => [ |
||||
|
'memory' => 1024, |
||||
|
'threads' => 2, |
||||
|
'time' => 2, |
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,105 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Monolog\Handler\NullHandler; |
||||
|
use Monolog\Handler\StreamHandler; |
||||
|
use Monolog\Handler\SyslogUdpHandler; |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Default Log Channel |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option defines the default log channel that gets used when writing |
||||
|
| messages to the logs. The name specified in this option should match |
||||
|
| one of the channels defined in the "channels" configuration array. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'default' => env('LOG_CHANNEL', 'stack'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Log Channels |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may configure the log channels for your application. Out of |
||||
|
| the box, Laravel uses the Monolog PHP logging library. This gives |
||||
|
| you a variety of powerful log handlers / formatters to utilize. |
||||
|
| |
||||
|
| Available Drivers: "single", "daily", "slack", "syslog", |
||||
|
| "errorlog", "monolog", |
||||
|
| "custom", "stack" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'channels' => [ |
||||
|
'stack' => [ |
||||
|
'driver' => 'stack', |
||||
|
'channels' => ['single'], |
||||
|
'ignore_exceptions' => false, |
||||
|
], |
||||
|
|
||||
|
'single' => [ |
||||
|
'driver' => 'single', |
||||
|
'path' => storage_path('logs/laravel.log'), |
||||
|
'level' => env('LOG_LEVEL', 'debug'), |
||||
|
], |
||||
|
|
||||
|
'daily' => [ |
||||
|
'driver' => 'daily', |
||||
|
'path' => storage_path('logs/laravel.log'), |
||||
|
'level' => env('LOG_LEVEL', 'debug'), |
||||
|
'days' => 14, |
||||
|
], |
||||
|
|
||||
|
'slack' => [ |
||||
|
'driver' => 'slack', |
||||
|
'url' => env('LOG_SLACK_WEBHOOK_URL'), |
||||
|
'username' => 'Laravel Log', |
||||
|
'emoji' => ':boom:', |
||||
|
'level' => env('LOG_LEVEL', 'critical'), |
||||
|
], |
||||
|
|
||||
|
'papertrail' => [ |
||||
|
'driver' => 'monolog', |
||||
|
'level' => env('LOG_LEVEL', 'debug'), |
||||
|
'handler' => SyslogUdpHandler::class, |
||||
|
'handler_with' => [ |
||||
|
'host' => env('PAPERTRAIL_URL'), |
||||
|
'port' => env('PAPERTRAIL_PORT'), |
||||
|
], |
||||
|
], |
||||
|
|
||||
|
'stderr' => [ |
||||
|
'driver' => 'monolog', |
||||
|
'level' => env('LOG_LEVEL', 'debug'), |
||||
|
'handler' => StreamHandler::class, |
||||
|
'formatter' => env('LOG_STDERR_FORMATTER'), |
||||
|
'with' => [ |
||||
|
'stream' => 'php://stderr', |
||||
|
], |
||||
|
], |
||||
|
|
||||
|
'syslog' => [ |
||||
|
'driver' => 'syslog', |
||||
|
'level' => env('LOG_LEVEL', 'debug'), |
||||
|
], |
||||
|
|
||||
|
'errorlog' => [ |
||||
|
'driver' => 'errorlog', |
||||
|
'level' => env('LOG_LEVEL', 'debug'), |
||||
|
], |
||||
|
|
||||
|
'null' => [ |
||||
|
'driver' => 'monolog', |
||||
|
'handler' => NullHandler::class, |
||||
|
], |
||||
|
|
||||
|
'emergency' => [ |
||||
|
'path' => storage_path('logs/laravel.log'), |
||||
|
], |
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,110 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Default Mailer |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option controls the default mailer that is used to send any email |
||||
|
| messages sent by your application. Alternative mailers may be setup |
||||
|
| and used as needed; however, this mailer will be used by default. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'default' => env('MAIL_MAILER', 'smtp'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Mailer Configurations |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may configure all of the mailers used by your application plus |
||||
|
| their respective settings. Several examples have been configured for |
||||
|
| you and you are free to add your own as your application requires. |
||||
|
| |
||||
|
| Laravel supports a variety of mail "transport" drivers to be used while |
||||
|
| sending an e-mail. You will specify which one you are using for your |
||||
|
| mailers below. You are free to add additional mailers as required. |
||||
|
| |
||||
|
| Supported: "smtp", "sendmail", "mailgun", "ses", |
||||
|
| "postmark", "log", "array" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'mailers' => [ |
||||
|
'smtp' => [ |
||||
|
'transport' => 'smtp', |
||||
|
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), |
||||
|
'port' => env('MAIL_PORT', 587), |
||||
|
'encryption' => env('MAIL_ENCRYPTION', 'tls'), |
||||
|
'username' => env('MAIL_USERNAME'), |
||||
|
'password' => env('MAIL_PASSWORD'), |
||||
|
'timeout' => null, |
||||
|
'auth_mode' => null, |
||||
|
], |
||||
|
|
||||
|
'ses' => [ |
||||
|
'transport' => 'ses', |
||||
|
], |
||||
|
|
||||
|
'mailgun' => [ |
||||
|
'transport' => 'mailgun', |
||||
|
], |
||||
|
|
||||
|
'postmark' => [ |
||||
|
'transport' => 'postmark', |
||||
|
], |
||||
|
|
||||
|
'sendmail' => [ |
||||
|
'transport' => 'sendmail', |
||||
|
'path' => '/usr/sbin/sendmail -bs', |
||||
|
], |
||||
|
|
||||
|
'log' => [ |
||||
|
'transport' => 'log', |
||||
|
'channel' => env('MAIL_LOG_CHANNEL'), |
||||
|
], |
||||
|
|
||||
|
'array' => [ |
||||
|
'transport' => 'array', |
||||
|
], |
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Global "From" Address |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| You may wish for all e-mails sent by your application to be sent from |
||||
|
| the same address. Here, you may specify a name and address that is |
||||
|
| used globally for all e-mails that are sent by your application. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'from' => [ |
||||
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), |
||||
|
'name' => env('MAIL_FROM_NAME', 'Example'), |
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Markdown Mail Settings |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| If you are using Markdown based email rendering, you may configure your |
||||
|
| theme and component paths here, allowing you to customize the design |
||||
|
| of the emails. Or, you may simply stick with the Laravel defaults! |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'markdown' => [ |
||||
|
'theme' => 'default', |
||||
|
|
||||
|
'paths' => [ |
||||
|
resource_path('views/vendor/mail'), |
||||
|
], |
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,93 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Default Queue Connection Name |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Laravel's queue API supports an assortment of back-ends via a single |
||||
|
| API, giving you convenient access to each back-end using the same |
||||
|
| syntax for every one. Here you may define a default connection. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'default' => env('QUEUE_CONNECTION', 'sync'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Queue Connections |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may configure the connection information for each server that |
||||
|
| is used by your application. A default configuration has been added |
||||
|
| for each back-end shipped with Laravel. You are free to add more. |
||||
|
| |
||||
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'connections' => [ |
||||
|
|
||||
|
'sync' => [ |
||||
|
'driver' => 'sync', |
||||
|
], |
||||
|
|
||||
|
'database' => [ |
||||
|
'driver' => 'database', |
||||
|
'table' => 'jobs', |
||||
|
'queue' => 'default', |
||||
|
'retry_after' => 90, |
||||
|
'after_commit' => false, |
||||
|
], |
||||
|
|
||||
|
'beanstalkd' => [ |
||||
|
'driver' => 'beanstalkd', |
||||
|
'host' => 'localhost', |
||||
|
'queue' => 'default', |
||||
|
'retry_after' => 90, |
||||
|
'block_for' => 0, |
||||
|
'after_commit' => false, |
||||
|
], |
||||
|
|
||||
|
'sqs' => [ |
||||
|
'driver' => 'sqs', |
||||
|
'key' => env('AWS_ACCESS_KEY_ID'), |
||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
||||
|
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), |
||||
|
'queue' => env('SQS_QUEUE', 'default'), |
||||
|
'suffix' => env('SQS_SUFFIX'), |
||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), |
||||
|
'after_commit' => false, |
||||
|
], |
||||
|
|
||||
|
'redis' => [ |
||||
|
'driver' => 'redis', |
||||
|
'connection' => 'default', |
||||
|
'queue' => env('REDIS_QUEUE', 'default'), |
||||
|
'retry_after' => 90, |
||||
|
'block_for' => null, |
||||
|
'after_commit' => false, |
||||
|
], |
||||
|
|
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Failed Queue Jobs |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| These options configure the behavior of failed queue job logging so you |
||||
|
| can control which database and table are used to store the jobs that |
||||
|
| have failed. You may change them to any database / table you wish. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'failed' => [ |
||||
|
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), |
||||
|
'database' => env('DB_CONNECTION', 'mysql'), |
||||
|
'table' => 'failed_jobs', |
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,33 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Third Party Services |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This file is for storing the credentials for third party services such |
||||
|
| as Mailgun, Postmark, AWS and more. This file provides the de facto |
||||
|
| location for this type of information, allowing packages to have |
||||
|
| a conventional file to locate the various service credentials. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'mailgun' => [ |
||||
|
'domain' => env('MAILGUN_DOMAIN'), |
||||
|
'secret' => env('MAILGUN_SECRET'), |
||||
|
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), |
||||
|
], |
||||
|
|
||||
|
'postmark' => [ |
||||
|
'token' => env('POSTMARK_TOKEN'), |
||||
|
], |
||||
|
|
||||
|
'ses' => [ |
||||
|
'key' => env('AWS_ACCESS_KEY_ID'), |
||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), |
||||
|
], |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,201 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Support\Str; |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Default Session Driver |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option controls the default session "driver" that will be used on |
||||
|
| requests. By default, we will use the lightweight native driver but |
||||
|
| you may specify any of the other wonderful drivers provided here. |
||||
|
| |
||||
|
| Supported: "file", "cookie", "database", "apc", |
||||
|
| "memcached", "redis", "dynamodb", "array" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'driver' => env('SESSION_DRIVER', 'file'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session Lifetime |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may specify the number of minutes that you wish the session |
||||
|
| to be allowed to remain idle before it expires. If you want them |
||||
|
| to immediately expire on the browser closing, set that option. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'lifetime' => env('SESSION_LIFETIME', 120), |
||||
|
|
||||
|
'expire_on_close' => false, |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session Encryption |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option allows you to easily specify that all of your session data |
||||
|
| should be encrypted before it is stored. All encryption will be run |
||||
|
| automatically by Laravel and you can use the Session like normal. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'encrypt' => false, |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session File Location |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| When using the native session driver, we need a location where session |
||||
|
| files may be stored. A default has been set for you but a different |
||||
|
| location may be specified. This is only needed for file sessions. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'files' => storage_path('framework/sessions'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session Database Connection |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| When using the "database" or "redis" session drivers, you may specify a |
||||
|
| connection that should be used to manage these sessions. This should |
||||
|
| correspond to a connection in your database configuration options. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'connection' => env('SESSION_CONNECTION', null), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session Database Table |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| When using the "database" session driver, you may specify the table we |
||||
|
| should use to manage the sessions. Of course, a sensible default is |
||||
|
| provided for you; however, you are free to change this as needed. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'table' => 'sessions', |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session Cache Store |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| While using one of the framework's cache driven session backends you may |
||||
|
| list a cache store that should be used for these sessions. This value |
||||
|
| must match with one of the application's configured cache "stores". |
||||
|
| |
||||
|
| Affects: "apc", "dynamodb", "memcached", "redis" |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'store' => env('SESSION_STORE', null), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session Sweeping Lottery |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Some session drivers must manually sweep their storage location to get |
||||
|
| rid of old sessions from storage. Here are the chances that it will |
||||
|
| happen on a given request. By default, the odds are 2 out of 100. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'lottery' => [2, 100], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session Cookie Name |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may change the name of the cookie used to identify a session |
||||
|
| instance by ID. The name specified here will get used every time a |
||||
|
| new session cookie is created by the framework for every driver. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'cookie' => env( |
||||
|
'SESSION_COOKIE', |
||||
|
Str::slug(env('APP_NAME', 'laravel'), '_').'_session' |
||||
|
), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session Cookie Path |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| The session cookie path determines the path for which the cookie will |
||||
|
| be regarded as available. Typically, this will be the root path of |
||||
|
| your application but you are free to change this when necessary. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'path' => '/', |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Session Cookie Domain |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Here you may change the domain of the cookie used to identify a session |
||||
|
| in your application. This will determine which domains the cookie is |
||||
|
| available to in your application. A sensible default has been set. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'domain' => env('SESSION_DOMAIN', null), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| HTTPS Only Cookies |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| By setting this option to true, session cookies will only be sent back |
||||
|
| to the server if the browser has a HTTPS connection. This will keep |
||||
|
| the cookie from being sent to you when it can't be done securely. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'secure' => env('SESSION_SECURE_COOKIE'), |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| HTTP Access Only |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Setting this value to true will prevent JavaScript from accessing the |
||||
|
| value of the cookie and the cookie will only be accessible through |
||||
|
| the HTTP protocol. You are free to modify this option if needed. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'http_only' => true, |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Same-Site Cookies |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option determines how your cookies behave when cross-site requests |
||||
|
| take place, and can be used to mitigate CSRF attacks. By default, we |
||||
|
| will set this value to "lax" since this is a secure default value. |
||||
|
| |
||||
|
| Supported: "lax", "strict", "none", null |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'same_site' => 'lax', |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?php |
||||
|
|
||||
|
return [ |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| View Storage Paths |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| Most templating systems load templates from disk. Here you may specify |
||||
|
| an array of paths that should be checked for your views. Of course |
||||
|
| the usual Laravel view path has already been registered for you. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'paths' => [ |
||||
|
resource_path('views'), |
||||
|
], |
||||
|
|
||||
|
/* |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| Compiled View Path |
||||
|
|-------------------------------------------------------------------------- |
||||
|
| |
||||
|
| This option determines where all the compiled Blade templates will be |
||||
|
| stored for your application. Typically, this is within the storage |
||||
|
| directory. However, as usual, you are free to change this value. |
||||
|
| |
||||
|
*/ |
||||
|
|
||||
|
'compiled' => env( |
||||
|
'VIEW_COMPILED_PATH', |
||||
|
realpath(storage_path('framework/views')) |
||||
|
), |
||||
|
|
||||
|
]; |
||||
@ -0,0 +1 @@ |
|||||
|
*.sqlite* |
||||
@ -0,0 +1,47 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace Database\Factories; |
||||
|
|
||||
|
use App\Models\User; |
||||
|
use Illuminate\Database\Eloquent\Factories\Factory; |
||||
|
use Illuminate\Support\Str; |
||||
|
|
||||
|
class UserFactory extends Factory |
||||
|
{ |
||||
|
/** |
||||
|
* The name of the factory's corresponding model. |
||||
|
* |
||||
|
* @var string |
||||
|
*/ |
||||
|
protected $model = User::class; |
||||
|
|
||||
|
/** |
||||
|
* Define the model's default state. |
||||
|
* |
||||
|
* @return array |
||||
|
*/ |
||||
|
public function definition() |
||||
|
{ |
||||
|
return [ |
||||
|
'name' => $this->faker->name(), |
||||
|
'email' => $this->faker->unique()->safeEmail(), |
||||
|
'email_verified_at' => now(), |
||||
|
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
|
'remember_token' => Str::random(10), |
||||
|
]; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Indicate that the model's email address should be unverified. |
||||
|
* |
||||
|
* @return \Illuminate\Database\Eloquent\Factories\Factory |
||||
|
*/ |
||||
|
public function unverified() |
||||
|
{ |
||||
|
return $this->state(function (array $attributes) { |
||||
|
return [ |
||||
|
'email_verified_at' => null, |
||||
|
]; |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,37 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
class CreateUsersTable extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function up() |
||||
|
{ |
||||
|
Schema::create('users', function (Blueprint $table) { |
||||
|
$table->id(); |
||||
|
$table->text('name'); |
||||
|
$table->text('username'); |
||||
|
$table->text('email')->unique(); |
||||
|
$table->timestamp('email_verified_at')->nullable(); |
||||
|
$table->text('password'); |
||||
|
$table->rememberToken(); |
||||
|
$table->timestamps(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function down() |
||||
|
{ |
||||
|
Schema::dropIfExists('users'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
class CreatePasswordResetsTable extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function up() |
||||
|
{ |
||||
|
Schema::create('password_resets', function (Blueprint $table) { |
||||
|
$table->string('email')->index(); |
||||
|
$table->string('token'); |
||||
|
$table->timestamp('created_at')->nullable(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function down() |
||||
|
{ |
||||
|
Schema::dropIfExists('password_resets'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
class CreateFailedJobsTable extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function up() |
||||
|
{ |
||||
|
Schema::create('failed_jobs', function (Blueprint $table) { |
||||
|
$table->id(); |
||||
|
$table->string('uuid')->unique(); |
||||
|
$table->text('connection'); |
||||
|
$table->text('queue'); |
||||
|
$table->longText('payload'); |
||||
|
$table->longText('exception'); |
||||
|
$table->timestamp('failed_at')->useCurrent(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function down() |
||||
|
{ |
||||
|
Schema::dropIfExists('failed_jobs'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
class CreateAdjunctsTable extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function up() |
||||
|
{ |
||||
|
Schema::create('adjuncts', function (Blueprint $table) { |
||||
|
$table->integer('id')->primary('adjuncts_pkey'); |
||||
|
$table->text('name'); |
||||
|
$table->text('profile')->nullable(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function down() |
||||
|
{ |
||||
|
Schema::dropIfExists('adjuncts'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
class CreateBeerAdjunctsTable extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function up() |
||||
|
{ |
||||
|
Schema::create('beer_adjuncts', function (Blueprint $table) { |
||||
|
$table->integer('id')->primary('beer_adjuncts_pkey'); |
||||
|
$table->integer('beer_id'); |
||||
|
$table->integer('adjunct_id'); |
||||
|
$table->char('amount', 10); |
||||
|
$table->char('timing', 10); |
||||
|
$table->integer('alternative')->nullable(); |
||||
|
$table->text('notes')->nullable(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function down() |
||||
|
{ |
||||
|
Schema::dropIfExists('beer_adjuncts'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
class CreateBeerFermentationTable extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function up() |
||||
|
{ |
||||
|
Schema::create('beer_fermentation', function (Blueprint $table) { |
||||
|
$table->integer('id')->primary('beer_fermentation_pkey'); |
||||
|
$table->integer('beer_id'); |
||||
|
$table->integer('yeast_id'); |
||||
|
$table->char('temperature', 20)->nullable(); |
||||
|
$table->text('duration')->nullable(); |
||||
|
$table->integer('alternative')->nullable(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function down() |
||||
|
{ |
||||
|
Schema::dropIfExists('beer_fermentation'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
class CreateBeerGrainsTable extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function up() |
||||
|
{ |
||||
|
Schema::create('beer_grains', function (Blueprint $table) { |
||||
|
$table->integer('id')->primary('beers_grains_pkey'); |
||||
|
$table->integer('beer_id'); |
||||
|
$table->integer('grain_id'); |
||||
|
$table->char('amount', 7); |
||||
|
$table->char('grain_bill', 4); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function down() |
||||
|
{ |
||||
|
Schema::dropIfExists('beer_grains'); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
class CreateBeerHopsTable extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function up() |
||||
|
{ |
||||
|
Schema::create('beer_hops', function (Blueprint $table) { |
||||
|
$table->integer('id')->primary('beers_hops_pkey'); |
||||
|
$table->integer('beer_id'); |
||||
|
$table->integer('hop_id'); |
||||
|
$table->decimal('amount', 7); |
||||
|
$table->char('timing', 10); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
* |
||||
|
* @return void |
||||
|
*/ |
||||
|
public function down() |
||||
|
{ |
||||
|
Schema::dropIfExists('beer_hops'); |
||||
|
} |
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue