ini sudah ku upload

parents
No related merge requests found

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BladeInjectionConfiguration" escapedTextEnd="!!}" escapedTextStart="{!!" />
</project>
\ No newline at end of file
<component name="CopyrightManager">
<settings default="" />
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Laravel.iml" filepath="$PROJECT_DIR$/.idea/Laravel.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class AjaxImage extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'title', 'image'
];
}
\ No newline at end of file
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Blog extends Model
{
protected $table = 'blog_post';
}
<?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 Closure based commands for the application.
*
* @return void
*/
protected function commands()
{
require base_path('routes/console.php');
}
}
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('login');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Validator;
use App\AjaxImage;
class AjaxImageUploadController extends Controller
{
/**
* Show the application ajaxImageUpload.
*
* @return \Illuminate\Http\Response
*/
public function ajaxImageUpload()
{
return view('ajaxImageUpload');
}
/**
* Show the application ajaxImageUploadPost.
*
* @return \Illuminate\Http\Response
*/
public function ajaxImageUploadPost(Request $request)
{
$validator = Validator::make($request->all(), [
'title' => 'required',
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
if ($validator->passes()) {
$input = $request->all();
$input['image'] = time().'.'.$request->image->getClientOriginalExtension();
$request->image->move(public_path('images'), $input['image']);
AjaxImage::create($input);
return response()->json(['success'=>'done']);
}
return response()->json(['error'=>$validator->errors()->all()]);
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\andaliman;
use Illuminate\Support\Facades\Input;
use App\Http\Requests;
use App\Http\Requests\andaliman\StoreRequest;
use App\Http\Requests\andaliman\UpdateRequest;
use Image;
class AndalimanController extends Controller
{
public function index()
{
$andalimans = andaliman::all();
return view('MonitoringAndaliman.index', compact('andalimans'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('MonitoringAndaliman.create');
}
public function siram()
{
return view('MonitoringAndaliman.siram');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$andalimans = new andaliman();
$andalimans->nama = $request->nama;
$andalimans->family = $request->family;
$andalimans->tanggal_tanam = $request->tanggal_tanam;
$andalimans->usia = $request->usia;
$andalimans->hama = $request->hama;
$andalimans->syarat_tumbuh = $request->syarat_tumbuh;
$andalimans->pemeliharaan = $request->pemeliharaan;
$file = $request->file('foto');
$fileName = $file->getClientOriginalName();
$request->file('foto')->move("image/",$fileName);
$andalimans->foto = $fileName;
// $image = Input::file('image');
// var_dump($image);
// Input::file('image')->getClientOriginalExtension();
// $filename = date('Y-m-d-H:i:s')."-".$image->getClientOriginalName();
// Image::make($image->getRealPath())->resize(468, 249)->save('public/image/'. $filename);
// $andalimans->foto = 'image/ '. $filename;
//
// $filename = $image[0]->getClientOriginalName();
// print_($filename);
// if ($request->hasFile('files_field')) {
// $file= $request->Input('files_field');
//
// $destination_path='image/';
//
// $Orname = $file->getClientOriginalName();
//
// $filename= str_random(6).'_'.$Orname;
//
// $file->move($destination_path,$filename);
//
// $andalimans->foto = $destination_path.$filename;
// }
$andalimans->save();
return redirect()->route('andaliman.index')->with('alert-success', 'Data Berhasil Disimpan.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$andalimans = andaliman::findOrFail($id);
return view('MonitoringAndaliman.lihat', compact('andalimans'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$andalimans = andaliman::findOrFail($id);
return view('andaliman.edit', compact('andalimans'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateRequest $request, $id)
{
$andalimans = andaliman::findOrFail($id);
$andalimans->foto = $request->foto;
$andalimans->nama = $request->nama;
$andalimans->family = $request->family;
$andalimans->tanggal_tanam = $request->tanggal_tanam;
$andalimans->usia = $request->usia;
$andalimans->hama = $request->hama;
$andalimans->syarat_tumbuh = $request->syarat_tumbuh;
$andalimans->pemeliharaan = $request->pemeliharaan;
$file = $request->file('images');
$fileName = $file->getClientOriginalName();
$request->file('images')->move("image/",$fileName);
$andalimans->images = $fileName;
$andalimans->save();
return redirect()->route('andaliman.index')->with('alert-success', 'Data Berhasil Diubah.');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$andalimans = andaliman::findOrFail($id);
$andalimans->delete();
return redirect()->route('andaliman.index')->with('alert-success', 'Data Berhasil Dihapus.');
}
}
<?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;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
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
*/
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
// public function authenticated(){
// if (auth()->user()->hasjabatan('Admin')){return redirect('/admin');}
// return redirect('/home');
// }
}
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers;
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 login / registration.
*
* @var string
*/
protected $redirectTo = '/home';
protected $username = 'username';
/**
* 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|max:255',
'username' => 'required|unique:users',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
'jabatan' => 'required',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'username' => $data['username'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
'jabatan' => $data['jabatan'],
]);
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
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;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Blog;
class BlogController extends Controller
{
/**
* Display a listing of the resource.
*
* @return IlluminateHttpResponse
*/
public function index()
{
//show data
$blogs = Blog::all();
return view('blog.index',['blogs' => $blogs]);
}
/**
* Show the form for creating a new resource.
*
* @return IlluminateHttpResponse
*/
public function create()
{
//create new data
return view('blog.create');
}
/**
* Store a newly created resource in storage.
*
* @param IlluminateHttpRequest $request
* @return IlluminateHttpResponse
*/
public function store(Request $request)
{
// we will create validation function here
$this->validate($request,[
'title'=> 'required',
'description' => 'required',
]);
$blog = new Blog;
$blog->title = $request->title;
$blog->description = $request->description;
$file = $request->file('images');
$fileName = $file->getClientOriginalName();
$request->file('images')->move("image/",$fileName);
$blog->images = $fileName;
// save all data
$blog->save();
//redirect page after save data
return redirect('blog')->with('message','data hasbeen updated!');
}
/**
* Display the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function edit($id)
{
$blog = Blog::findOrFail($id);
// return to the edit views
return view('blog.edit',compact('blog'));
}
/**
* Update the specified resource in storage.
*
* @param IlluminateHttpRequest $request
* @param int $id
* @return IlluminateHttpResponse
*/
public function update(Request $request, $id)
{
// validation
$this->validate($request,[
'title'=> 'required',
'description' => 'required',
]);
$blog = Blog::findOrFail($id);
$blog->title = $request->title;
$blog->description = $request->description;
$blog->save();
return redirect()->route('blog.index')->with('alert-success','Data Hasbeen Saved!');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function destroy($id)
{
// delete data
$blog = Blog::findOrFail($id);
$blog->delete();
return redirect()->route('blog.index')->with('alert-success','Data Hasbeen Saved!');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\jagung;
class JagungController extends Controller
{
/**
* Display a listing of the resource.
*
* @return IlluminateHttpResponse
*/
public function index()
{
//show data
$jagungs = jagung::all();
return view('HalamanJagung.index',['jagungs' => $jagungs]);
}
/**
* Show the form for creating a new resource.
*
* @return IlluminateHttpResponse
*/
public function create()
{
//create new data
return view('HalamanJagung.create');
}
/**
* Store a newly created resource in storage.
*
* @param IlluminateHttpRequest $request
* @return IlluminateHttpResponse
*/
public function store(Request $request)
{
// we will create validation function here
$this->validate($request,[
'nama'=> 'required',
'family' => 'required',
]);
$jagungs = new jagung;
$jagungs->nama = $request->nama;
$jagungs->family = $request->family;
$jagungs->family = $request->family;
$jagungs->tanggal_tanam = $request->tanggal_tanam;
$jagungs->usia = $request->usia;
$jagungs->hama = $request->hama;
$jagungs->syarat_tumbuh = $request->syarat_tumbuh;
$jagungs->pemeliharaan = $request->pemeliharaan;
$file = $request->file('images');
$fileName = $file->getClientOriginalName();
$request->file('images')->move("image/",$fileName);
$jagungs->images = $fileName;
// save all data
$jagungs->save();
//redirect page after save data
return redirect('jagung')->with('message','data hasbeen updated!');
}
/**
* Display the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function show($id)
{
$jagungs = jagung::findOrFail($id);
return view('HalamanJagung.lihat', compact('jagungs'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function edit($id)
{
$jagungs = jagung::findOrFail($id);
// return to the edit views
return view('HalamanJagung.edit',compact('jagungs'));
}
/**
* Update the specified resource in storage.
*
* @param IlluminateHttpRequest $request
* @param int $id
* @return IlluminateHttpResponse
*/
public function update(Request $request, $id)
{
// validation
$this->validate($request,[
'nama'=> 'required',
'family' => 'required',
]);
$jagungs = jagung::findOrFail($id);
$jagungs->nama = $request->nama;
$jagungs->family = $request->family;
$jagungs->tanggal_tanam = $request->tanggal_tanam;
$jagungs->usia = $request->usia;
$jagungs->hama = $request->hama;
$jagungs->syarat_tumbuh = $request->syarat_tumbuh;
$jagungs->pemeliharaan = $request->pemeliharaan;
$jagungs->save();
return redirect()->route('jagung.index')->with('alert-success','Data Hasbeen Saved!');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function destroy($id)
{
// delete data
$jagungs = jagung::findOrFail($id);
$jagungs->delete();
return redirect()->route('jagung.index')->with('alert-success','Data Hasbeen Saved!');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\kacang;
use Illuminate\Support\Facades\Input;
use App\Http\Requests;
use App\Http\Requests\kacang\StoreRequest;
use App\Http\Requests\kacang\UpdateRequest;
use Image;
class KacangController extends Controller
{
public function index()
{
$kacangs = kacang::all();
return view('MonitoringKacang.index', compact('kacangs'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('MonitoringKacang.create');
}
public function siram()
{
return view('HalamanMonitoring.siram');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$kacangs = new kacang();
$kacangs->nama = $request->nama;
$kacangs->family = $request->family;
$kacangs->tanggal_tanam = $request->tanggal_tanam;
$kacangs->usia = $request->usia;
$kacangs->hama = $request->hama;
$kacangs->syarat_tumbuh = $request->syarat_tumbuh;
$kacangs->pemeliharaan = $request->pemeliharaan;
$file = $request->file('foto');
$fileName = $file->getClientOriginalName();
$request->file('foto')->move("image/",$fileName);
$kacangs->foto = $fileName;
// $image = Input::file('image');
// var_dump($image);
// Input::file('image')->getClientOriginalExtension();
// $filename = date('Y-m-d-H:i:s')."-".$image->getClientOriginalName();
// Image::make($image->getRealPath())->resize(468, 249)->save('public/image/'. $filename);
// $kacangs->foto = 'image/ '. $filename;
//
// $filename = $image[0]->getClientOriginalName();
// print_($filename);
// if ($request->hasFile('files_field')) {
// $file= $request->Input('files_field');
//
// $destination_path='image/';
//
// $Orname = $file->getClientOriginalName();
//
// $filename= str_random(6).'_'.$Orname;
//
// $file->move($destination_path,$filename);
//
// $kacangs->foto = $destination_path.$filename;
// }
$kacangs->save();
return redirect()->route('kacang.index')->with('alert-success', 'Data Berhasil Disimpan.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$kacangs = kacang::findOrFail($id);
return view('HalamanMonitoring.lihat', compact('kacangs'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$kacangs = kacang::findOrFail($id);
return view('HalamanMonitoring.edit', compact('kacangs'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateRequest $request, $id)
{
$kacangs = kacang::findOrFail($id);
$kacangs->foto = $request->foto;
$kacangs->nama = $request->nama;
$kacangs->family = $request->family;
$kacangs->tanggal_tanam = $request->tanggal_tanam;
$kacangs->usia = $request->usia;
$kacangs->hama = $request->hama;
$kacangs->syarat_tumbuh = $request->syarat_tumbuh;
$kacangs->pemeliharaan = $request->pemeliharaan;
$file = $request->file('images');
$fileName = $file->getClientOriginalName();
$request->file('images')->move("image/",$fileName);
$kacangs->images = $fileName;
$kacangs->save();
return redirect()->route('HalamanMonitoring.index')->with('alert-success', 'Data Berhasil Diubah.');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$kacangs = kacang::findOrFail($id);
$kacangs->delete();
return redirect()->route('HalamanMonitoring.index')->with('alert-success', 'Data Berhasil Dihapus.');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\tomat;
class TomatController extends Controller
{
/**
* Display a listing of the resource.
*
* @return IlluminateHttpResponse
*/
public function index()
{
//show data
$tomats = tomat::all();
return view('HalamanTomat.index',['tomats' => $tomats]);
}
/**
* Show the form for creating a new resource.
*
* @return IlluminateHttpResponse
*/
public function create()
{
//create new data
return view('HalamanTomat.create');
}
/**
* Store a newly created resource in storage.
*
* @param IlluminateHttpRequest $request
* @return IlluminateHttpResponse
*/
public function store(Request $request)
{
// validation
$this->validate($request,[
'nama'=> 'required',
'family' => 'required',
]);
// create new data
$destinatonPath = '';
$filename = '';
$tomats = new tomat();
$tomats->nama = $request->nama;
$tomats->family = $request->family;
$tomats->tanggal_tanam = $request->tanggal_tanam;
$tomats->usia = $request->usia;
$tomats->hama = $request->hama;
$tomats->syarat_tumbuh = $request->syarat_tumbuh;
$tomats->pemeliharaan = $request->pemeliharaan;
$file = $request->file('images');
$fileName = $file->getClientOriginalName();
$request->file('images')->move("image/",$fileName);
$tomats->images = $fileName;
// save all data
$tomats->save();
return redirect()->route('tomat.index')->with('alert-success', 'Data Berhasil Disimpan.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function show($id)
{
$tomats = tomat::findOrFail($id);
return view('HalamanTomat.lihat', compact('tomats'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function edit($id)
{
$tomat = tomat::findOrFail($id);
// return to the edit views
return view('HalamanTomat.edit',compact('tomat'));
}
/**
* Update the specified resource in storage.
*
* @param IlluminateHttpRequest $request
* @param int $id
* @return IlluminateHttpResponse
*/
public function update(Request $request, $id)
{
// validation
$this->validate($request,[
'nama'=> 'required',
'family' => 'required',
]);
$tomats = tomat::findOrFail($id);
$tomats->images = $request->images;
$tomats->nama = $request->nama;
$tomats->family = $request->family;
$tomats->tanggal_tanam = $request->tanggal_tanam;
$tomats->usia = $request->usia;
$tomats->hama = $request->hama;
$tomats->syarat_tumbuh = $request->syarat_tumbuh;
$tomats->pemeliharaan = $request->pemeliharaan;
$tomats->save();
return redirect()->route('tomat.index')->with('alert-success','Data Hasbeen Saved!');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return IlluminateHttpResponse
*/
public function destroy($id)
{
// delete data
$tomat = tomat::findOrFail($id);
$tomat->delete();
return redirect()->route('tomat.index')->with('alert-success','Data Hasbeen Saved!');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator;
use Response;
use Redirect;
use Session;
use App\upload;
class UploadsController extends Controller {
public function index() {
return view('upload.index');
}
public function multiple_upload() {
// getting all of the post data
$files = Input::file('images');
// Making counting of uploaded images
$file_count = count($files);
// start count how many uploaded
$uploadcount = 0;
foreach ($files as $file) {
$rules = array('file' => 'required'); //'required|mimes:png,gif,jpeg,txt,pdf,doc'
$validator = Validator::make(array('file'=> $file), $rules);
if($validator->passes()){
$destinationPath = 'uploads'; // upload folder in public directory
$filename = $file->getClientOriginalName();
$upload_success = $file->move($destinationPath, $filename);
$uploadcount ++;
// save into database
$extension = $file->getClientOriginalExtension();
$entry = new Uploads();
$entry->mime = $file->getClientMimeType();
$entry->original_filename = $filename;
$entry->filename = $file->getFilename().'.'.$extension;
$entry->save();
}
}
if($uploadcount == $file_count){
Session::flash('success', 'Upload successfully');
return Redirect::to('upload');
} else {
return Redirect::to('upload')->withInput()->withErrors($validator);
}
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\cabe;
use App\Http\Requests;
use App\Http\Requests\cabe\StoreRequest;
use App\Http\Requests\cabe\UpdateRequest;
use Illuminate\Support\Facades\Input;
use Image;
class cabecontroller extends Controller
{
public function index()
{
$cabes = cabe::all();
return view('MonitoringCabe.monitoringcabe', compact('cabes'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('MonitoringCabe.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(StoreRequest $request)
{
$cabes = new cabe();
$cabes->nama = $request->nama;
$cabes->family = $request->family;
$cabes->tanggal_tanam = $request->tanggal_tanam;
$cabes->usia = $request->usia;
$cabes->hama = $request->hama;
$cabes->syarat_tumbuh = $request->syarat_tumbuh;
$cabes->pemeliharaan = $request->pemeliharaan;
$file = $request->file('foto');
$fileName = $file->getClientOriginalName();
$request->file('foto')->move("image/",$fileName);
$cabes->foto = $fileName;
$cabes->save();
return redirect()->route('cabe.index')->with('alert-success', 'Data Berhasil Disimpan.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$cabes = cabe::findOrFail($id);
return view('MonitoringCabe.lihat', compact('cabes'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$cabes = cabe::findOrFail($id);
return view('MonitoringCabe.edit', compact('cabes'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateRequest $request, $id)
{
$cabes = cabe::findOrFail($id);
$cabes->foto = $request->foto;
$cabes->nama = $request->nama;
$cabes->family = $request->family;
$cabes->tanggal_tanam = $request->tanggal_tanam;
$cabes->usia = $request->usia;
$cabes->hama = $request->hama;
$cabes->syarat_tumbuh = $request->syarat_tumbuh;
$cabes->pemeliharaan = $request->pemeliharaan;
$cabes->save();
return redirect()->route('cabe.index')->with('alert-success', 'Data Berhasil Diubah.');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$cabes = cabe::findOrFail($id);
$cabes->delete();
return redirect()->route('cabe.index')->with('alert-success', 'Data Berhasil Dihapus.');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class fileuploadcontroller extends Controller
{
/**
* Create view file
*
* @return void
*/
public function imageUpload()
{
return view('UploadFile.uploadfile');
}
/**
* Manage Post Request
*
* @return void
*/
public function imageUploadPost(Request $request)
{
$this->validate($request, [
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$imageName = time().'.'.$request->image->getClientOriginalExtension();
$request->image->move(public_path('images'), $imageName);
return back()
->with('success','Image Uploaded successfully.')
->with('path',$imageName);
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class halamanadmincontroller extends Controller
{
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('HalamanAdmin.index');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class halamanmonitoringcontroller extends Controller
{
public function index()
{
return view('HalamanMonitoring.index');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class halamanusercontroller extends Controller
{
public function index()
{
return view('HalamanUser.index');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
//use Illuminate\Auth;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
if(Auth::user()->jabatan== 'Admin'){
return view('HalamanAdmin.index');
}
else
return view('HalamanUser.index');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class jadwalcontroller extends Controller
{
public function index()
{
return view('HalamanJadwal.jadwal');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\kentang;
use Illuminate\Support\Facades\Input;
use App\Http\Requests;
use App\Http\Requests\kentang\StoreRequest;
use App\Http\Requests\kentang\UpdateRequest;
use Image;
class kentangcontroller extends Controller
{
public function index()
{
$kentangs = kentang::all();
return view('MonitoringKentang.monitoringkentang', compact('kentangs'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('MonitoringKentang.create');
}
public function siram()
{
return view('MonitoringKentang.siram');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$kentangs = new kentang();
$kentangs->nama = $request->nama;
$kentangs->family = $request->family;
$kentangs->tanggal_tanam = $request->tanggal_tanam;
$kentangs->usia = $request->usia;
$kentangs->hama = $request->hama;
$kentangs->syarat_tumbuh = $request->syarat_tumbuh;
$kentangs->pemeliharaan = $request->pemeliharaan;
$file = $request->file('foto');
$fileName = $file->getClientOriginalName();
$request->file('foto')->move("image/",$fileName);
$kentangs->foto = $fileName;
// $image = Input::file('image');
// var_dump($image);
// Input::file('image')->getClientOriginalExtension();
// $filename = date('Y-m-d-H:i:s')."-".$image->getClientOriginalName();
// Image::make($image->getRealPath())->resize(468, 249)->save('public/image/'. $filename);
// $kentangs->foto = 'image/ '. $filename;
//
// $filename = $image[0]->getClientOriginalName();
// print_($filename);
// if ($request->hasFile('files_field')) {
// $file= $request->Input('files_field');
//
// $destination_path='image/';
//
// $Orname = $file->getClientOriginalName();
//
// $filename= str_random(6).'_'.$Orname;
//
// $file->move($destination_path,$filename);
//
// $kentangs->foto = $destination_path.$filename;
// }
$kentangs->save();
return redirect()->route('kentang.index')->with('alert-success', 'Data Berhasil Disimpan.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$kentangs = kentang::findOrFail($id);
return view('MonitoringKentang.lihat', compact('kentangs'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$kentangs = kentang::findOrFail($id);
return view('MonitoringKentang.edit', compact('kentangs'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateRequest $request, $id)
{
$kentangs = kentang::findOrFail($id);
$kentangs->foto = $request->foto;
$kentangs->nama = $request->nama;
$kentangs->family = $request->family;
$kentangs->tanggal_tanam = $request->tanggal_tanam;
$kentangs->usia = $request->usia;
$kentangs->hama = $request->hama;
$kentangs->syarat_tumbuh = $request->syarat_tumbuh;
$kentangs->pemeliharaan = $request->pemeliharaan;
$file = $request->file('images');
$fileName = $file->getClientOriginalName();
$request->file('images')->move("image/",$fileName);
$kentangs->images = $fileName;
$kentangs->save();
return redirect()->route('HalamanMonitoring.index')->with('alert-success', 'Data Berhasil Diubah.');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$kentangs = kentang::findOrFail($id);
$kentangs->delete();
return redirect()->route('HalamanMonitoring.index')->with('alert-success', 'Data Berhasil Dihapus.');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\pengunjung;
use Illuminate\Support\Facades\Input;
use App\Http\Requests;
use App\Http\Requests\pengunjung\StoreRequest;
use App\Http\Requests\pengunjung\UpdateRequest;
use Image;
class PengunjungController extends Controller
{
public function index()
{
$pengunjungs = pengunjung::all();
return view('Pengunjung.index', compact('pengunjungs'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('Pengunjung.create');
}
public function siram()
{
return view('HalamanMonitoring.siram');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$pengunjungs = new pengunjung();
$pengunjungs->nama = $request->nama;
$pengunjungs->tanggal_lahir = $request->tanggal_lahir;
$pengunjungs->jenis_kelamin = $request->jenis_kelamin;
$pengunjungs->alamat= $request->alamat;
$pengunjungs->asal = $request->asal;
$pengunjungs->no_hp = $request->no_hp;
// $image = Input::file('image');
// var_dump($image);
// Input::file('image')->getClientOriginalExtension();
// $filename = date('Y-m-d-H:i:s')."-".$image->getClientOriginalName();
// Image::make($image->getRealPath())->resize(468, 249)->save('public/image/'. $filename);
// $pengunjungs->foto = 'image/ '. $filename;
//
// $filename = $image[0]->getClientOriginalName();
// print_($filename);
// if ($request->hasFile('files_field')) {
// $file= $request->Input('files_field');
//
// $destination_path='image/';
//
// $Orname = $file->getClientOriginalName();
//
// $filename= str_random(6).'_'.$Orname;
//
// $file->move($destination_path,$filename);
//
// $pengunjungs->foto = $destination_path.$filename;
// }
$pengunjungs->save();
return redirect()->route('pengunjung.index')->with('alert-success', 'Data Berhasil Disimpan.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$pengunjungs = pengunjung::findOrFail($id);
return view('HalamanMonitoring.lihat', compact('pengunjungs'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$pengunjungs = pengunjung::findOrFail($id);
return view('HalamanMonitoring.edit', compact('pengunjungs'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateRequest $request, $id)
{
$pengunjungs = pengunjung::findOrFail($id);
$pengunjungs->foto = $request->foto;
$pengunjungs->nama = $request->nama;
$pengunjungs->family = $request->family;
$pengunjungs->tanggal_tanam = $request->tanggal_tanam;
$pengunjungs->usia = $request->usia;
$pengunjungs->hama = $request->hama;
$pengunjungs->syarat_tumbuh = $request->syarat_tumbuh;
$pengunjungs->pemeliharaan = $request->pemeliharaan;
$file = $request->file('images');
$fileName = $file->getClientOriginalName();
$request->file('images')->move("image/",$fileName);
$pengunjungs->images = $fileName;
$pengunjungs->save();
return redirect()->route('HalamanMonitoring.index')->with('alert-success', 'Data Berhasil Diubah.');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$pengunjungs = pengunjung::findOrFail($id);
$pengunjungs->delete();
return redirect()->route('HalamanMonitoring.index')->with('alert-success', 'Data Berhasil Dihapus.');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\sayur;
use Illuminate\Support\Facades\Input;
use App\Http\Requests;
use App\Http\Requests\sayur\StoreRequest;
use App\Http\Requests\sayur\UpdateRequest;
use Image;
class sayurcontroller extends Controller
{
public function index()
{
$sayurs = sayur::all();
return view('HalamanMonitoring.monitoringsayur', compact('sayurs'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('HalamanMonitoring.create');
}
public function siram()
{
return view('HalamanMonitoring.siram');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$sayurs = new sayur();
$sayurs->nama = $request->nama;
$sayurs->family = $request->family;
$sayurs->tanggal_tanam = $request->tanggal_tanam;
$sayurs->usia = $request->usia;
$sayurs->hama = $request->hama;
$sayurs->syarat_tumbuh = $request->syarat_tumbuh;
$sayurs->pemeliharaan = $request->pemeliharaan;
$file = $request->file('foto');
$fileName = $file->getClientOriginalName();
$request->file('foto')->move("image/",$fileName);
$sayurs->foto = $fileName;
// $image = Input::file('image');
// var_dump($image);
// Input::file('image')->getClientOriginalExtension();
// $filename = date('Y-m-d-H:i:s')."-".$image->getClientOriginalName();
// Image::make($image->getRealPath())->resize(468, 249)->save('public/image/'. $filename);
// $sayurs->foto = 'image/ '. $filename;
//
// $filename = $image[0]->getClientOriginalName();
// print_($filename);
// if ($request->hasFile('files_field')) {
// $file= $request->Input('files_field');
//
// $destination_path='image/';
//
// $Orname = $file->getClientOriginalName();
//
// $filename= str_random(6).'_'.$Orname;
//
// $file->move($destination_path,$filename);
//
// $sayurs->foto = $destination_path.$filename;
// }
$sayurs->save();
return redirect()->route('HalamanMonitoring.index')->with('alert-success', 'Data Berhasil Disimpan.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$sayurs = sayur::findOrFail($id);
return view('HalamanMonitoring.lihat', compact('sayurs'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$sayurs = sayur::findOrFail($id);
return view('HalamanMonitoring.edit', compact('sayurs'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateRequest $request, $id)
{
$sayurs = sayur::findOrFail($id);
$sayurs->foto = $request->foto;
$sayurs->nama = $request->nama;
$sayurs->family = $request->family;
$sayurs->tanggal_tanam = $request->tanggal_tanam;
$sayurs->usia = $request->usia;
$sayurs->hama = $request->hama;
$sayurs->syarat_tumbuh = $request->syarat_tumbuh;
$sayurs->pemeliharaan = $request->pemeliharaan;
$file = $request->file('images');
$fileName = $file->getClientOriginalName();
$request->file('images')->move("image/",$fileName);
$sayurs->images = $fileName;
$sayurs->save();
return redirect()->route('HalamanMonitoring.index')->with('alert-success', 'Data Berhasil Diubah.');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$sayurs = sayur::findOrFail($id);
$sayurs->delete();
return redirect()->route('HalamanMonitoring.index')->with('alert-success', 'Data Berhasil Dihapus.');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\sayur;
use App\Http\Requests;
use App\Http\Requests\sayur\StoreRequest;
use App\Http\Requests\sayur\UpdateRequest;
class siramcontroller extends Controller
{
public function index()
{
return view('HalamanMonitoring.siram');
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('HalamanMonitoring.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(StoreRequest $request)
{
$sayurs = new sayur();
$sayurs->foto = $request->foto;
$sayurs->nama = $request->nama;
$sayurs->family = $request->family;
$sayurs->tanggal_tanam = $request->tanggal_tanam;
$sayurs->usia = $request->usia;
$sayurs->hama = $request->hama;
$sayurs->syarat_tumbuh = $request->syarat_tumbuh;
$sayurs->pemeliharaan = $request->pemeliharaan;
$sayurs->save();
return redirect()->route('HalamanMonitoring.siram')->with('alert-success', 'Data Berhasil Disimpan.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$sayurs = sayur::findOrFail($id);
return view('HalamanMonitoring.lihat', compact('sayurs'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$sayurs = sayur::findOrFail($id);
return view('HalamanMonitoring.edit', compact('sayurs'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateRequest $request, $id)
{
$sayurs = sayur::findOrFail($id);
$sayurs->foto = $request->foto;
$sayurs->nama = $request->nama;
$sayurs->family = $request->family;
$sayurs->tanggal_tanam = $request->tanggal_tanam;
$sayurs->usia = $request->usia;
$sayurs->hama = $request->hama;
$sayurs->syarat_tumbuh = $request->syarat_tumbuh;
$sayurs->pemeliharaan = $request->pemeliharaan;
$sayurs->save();
return redirect()->route('HalamanMonitoring.siram')->with('alert-success', 'Data Berhasil Diubah.');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$sayurs = sayur::findOrFail($id);
$sayurs->delete();
return redirect()->route('HalamanMonitoring.siram')->with('alert-success', 'Data Berhasil Dihapus.');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\ubi;
use App\Http\Requests;
use App\Http\Requests\ubi\StoreRequest;
use App\Http\Requests\ubi\UpdateRequest;
use Illuminate\Support\Facades\Input;
use Image;
class ubicontroller extends Controller
{
public function index()
{
$ubis = ubi::all();
return view('MonitoringUbi.monitoringubi', compact('ubis'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('MonitoringUbi.create');
}
public function siram()
{
return view('MonitoringUbi.siram');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(StoreRequest $request)
{
$ubis = new ubi();
$ubis->nama = $request->nama;
$ubis->family = $request->family;
$ubis->tanggal_tanam = $request->tanggal_tanam;
$ubis->usia = $request->usia;
$ubis->hama = $request->hama;
$ubis->syarat_tumbuh = $request->syarat_tumbuh;
$ubis->pemeliharaan = $request->pemeliharaan;
$file = $request->file('foto');
$fileName = $file->getClientOriginalName();
$request->file('foto')->move("image/",$fileName);
$ubis->foto = $fileName;
$ubis->save();
return redirect()->route('ubi.index')->with('alert-success', 'Data Berhasil Disimpan.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
$ubis = ubi::findOrFail($id);
return view('MonitoringUbi.lihat', compact('ubis'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$ubis = ubi::findOrFail($id);
return view('MonitoringUbi.edit', compact('ubis'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(UpdateRequest $request, $id)
{
$ubis = ubi::findOrFail($id);
$ubis->foto = $request->foto;
$ubis->nama = $request->nama;
$ubis->family = $request->family;
$ubis->tanggal_tanam = $request->tanggal_tanam;
$ubis->usia = $request->usia;
$ubis->hama = $request->hama;
$ubis->syarat_tumbuh = $request->syarat_tumbuh;
$ubis->pemeliharaan = $request->pemeliharaan;
$ubis->save();
return redirect()->route('cabe.index')->with('alert-success', 'Data Berhasil Diubah.');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$ubis = ubi::findOrFail($id);
$ubis->delete();
return redirect()->route('cabe.index')->with('alert-success', 'Data Berhasil Dihapus.');
}
}
<?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 = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::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\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
'throttle:60,1',
'bindings',
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
];
}
<?php
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
class EncryptCookies extends BaseEncrypter
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array
*/
protected $except = [
//
];
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/home');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
class VerifyCsrfToken extends BaseVerifier
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
//
];
}
<?php
namespace App\Http\Requests\andaliman;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\andaliman;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\cabe;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'foto' => 'Required',
'nama' => 'Required',
'family' => 'Required',
'tanggal_tanam' => 'Required',
'usia' => 'Required',
'hama' => 'Required',
'syarat_tumbuh' => 'Required',
'pemeliharaan' => 'Required'
];
}
public function messages()
{
return [
'foto.required' => 'silahkan Upload Foto.',
'nama.required' => 'Nama Tidak Boleh Kosong.',
'family.required' => 'Family Tidak Boleh Kosong.',
'tanggal_tanam.required' => 'Tanggal Tanamn Tidak Boleh Kosong.',
'usia.required' => 'Usia Tidak Boleh Kosong.',
'hama.required' => 'Hama Tidak Boleh Kosong.',
'syarat_tumbuh.required' => 'Syarat Tumbuh Tidak Boleh Kosong.',
'pemeliharaan.required' => 'Pemliharaan Tidak Boleh Kosong.'
];
}
}
<?php
namespace App\Http\Requests\cabe;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'foto' => 'Required',
'nama' => 'Required',
'family' => 'Required',
'tanggal_tanam' => 'Required',
'usia' => 'Required',
'hama' => 'Required',
'syarat_tumbuh' => 'Required',
'pemeliharaan' => 'Required'
];
}
public function messages()
{
return [
'foto.required' => 'silahkan Upload Foto.',
'nama.required' => 'Nama Tidak Boleh Kosong.',
'family.required' => 'Family Tidak Boleh Kosong.',
'tanggal_tanam.required' => 'Tanggal Tanamn Tidak Boleh Kosong.',
'usia.required' => 'Usia Tidak Boleh Kosong.',
'hama.required' => 'Hama Tidak Boleh Kosong.',
'syarat_tumbuh.required' => 'Syarat Tumbuh Tidak Boleh Kosong.',
'pemeliharaan.required' => 'Pemliharaan Tidak Boleh Kosong.'
];
}
}
<?php
namespace App\Http\Requests\kacang;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\kacang;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\kentang;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\kentang;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\pengunjung;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\pengunjung;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\sayur;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'foto' => 'Required',
'nama' => 'Required',
'family' => 'Required',
'tanggal_tanam' => 'Required',
'usia' => 'Required',
'hama' => 'Required',
'syarat_tumbuh' => 'Required',
'pemeliharaan' => 'Required'
];
}
public function messages()
{
return [
'foto.required' => 'silahkan Upload Foto.',
'nama.required' => 'Nama Tidak Boleh Kosong.',
'family.required' => 'Family Tidak Boleh Kosong.',
'tanggal_tanam.required' => 'Tanggal Tanamn Tidak Boleh Kosong.',
'usia.required' => 'Usia Tidak Boleh Kosong.',
'hama.required' => 'Hama Tidak Boleh Kosong.',
'syarat_tumbuh.required' => 'Syarat Tumbuh Tidak Boleh Kosong.',
'pemeliharaan.required' => 'Pemliharaan Tidak Boleh Kosong.'
];
}
}
<?php
namespace App\Http\Requests\sayur;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'foto' => 'Required',
'nama' => 'Required',
'family' => 'Required',
'tanggal_tanam' => 'Required',
'usia' => 'Required',
'hama' => 'Required',
'syarat_tumbuh' => 'Required',
'pemeliharaan' => 'Required'
];
}
public function messages()
{
return [
'foto.required' => 'silahkan Upload Foto.',
'nama.required' => 'Nama Tidak Boleh Kosong.',
'family.required' => 'Family Tidak Boleh Kosong.',
'tanggal_tanam.required' => 'Tanggal Tanamn Tidak Boleh Kosong.',
'usia.required' => 'Usia Tidak Boleh Kosong.',
'hama.required' => 'Hama Tidak Boleh Kosong.',
'syarat_tumbuh.required' => 'Syarat Tumbuh Tidak Boleh Kosong.',
'pemeliharaan.required' => 'Pemliharaan Tidak Boleh Kosong.'
];
}
}
<?php
namespace App\Http\Requests\tomat;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\tomat;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}
<?php
namespace App\Http\Requests\ubi;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'foto' => 'Required',
'nama' => 'Required',
'family' => 'Required',
'tanggal_tanam' => 'Required',
'usia' => 'Required',
'hama' => 'Required',
'syarat_tumbuh' => 'Required',
'pemeliharaan' => 'Required'
];
}
public function messages()
{
return [
'foto.required' => 'silahkan Upload Foto.',
'nama.required' => 'Nama Tidak Boleh Kosong.',
'family.required' => 'Family Tidak Boleh Kosong.',
'tanggal_tanam.required' => 'Tanggal Tanamn Tidak Boleh Kosong.',
'usia.required' => 'Usia Tidak Boleh Kosong.',
'hama.required' => 'Hama Tidak Boleh Kosong.',
'syarat_tumbuh.required' => 'Syarat Tumbuh Tidak Boleh Kosong.',
'pemeliharaan.required' => 'Pemliharaan Tidak Boleh Kosong.'
];
}
}
<?php
namespace App\Http\Requests\ubi;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'foto' => 'Required',
'nama' => 'Required',
'family' => 'Required',
'tanggal_tanam' => 'Required',
'usia' => 'Required',
'hama' => 'Required',
'syarat_tumbuh' => 'Required',
'pemeliharaan' => 'Required'
];
}
public function messages()
{
return [
'foto.required' => 'silahkan Upload Foto.',
'nama.required' => 'Nama Tidak Boleh Kosong.',
'family.required' => 'Family Tidak Boleh Kosong.',
'tanggal_tanam.required' => 'Tanggal Tanamn Tidak Boleh Kosong.',
'usia.required' => 'Usia Tidak Boleh Kosong.',
'hama.required' => 'Hama Tidak Boleh Kosong.',
'syarat_tumbuh.required' => 'Syarat Tumbuh Tidak Boleh Kosong.',
'pemeliharaan.required' => 'Pemliharaan Tidak Boleh Kosong.'
];
}
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes();
/*
* Authenticate the user's personal channel...
*/
Broadcast::channel('App.User.*', function ($user, $userId) {
return (int) $user->id === (int) $userId;
});
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'App\Events\SomeEvent' => [
'App\Listeners\EventListener',
],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
parent::boot();
//
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @return void
*/
public function boot()
{
//
parent::boot();
}
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
require base_path('routes/web.php');
});
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::group([
'middleware' => 'api',
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
});
}
}
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'username','email', 'password','jabatan',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class andaliman extends Model
{
//
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class cabe extends Model
{
//
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class jagung extends Model
{
//
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class kacang extends Model
{
//
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class kentang extends Model
{
//
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class pengunjung extends Model
{
//
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class sayur extends Model
{
//
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class tomat extends Model
{
protected $table = 'tomats';
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class ubi extends Model
{
//
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class upload extends Model
{
protected $table = 'upload';
}
#!/usr/bin/env php
<?php
/*
|--------------------------------------------------------------------------
| 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 our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/bootstrap/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);
<?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(
realpath(__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;
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Composer 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 our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/
$compiledPath = __DIR__.'/cache/compiled.php';
if (file_exists($compiledPath)) {
require $compiledPath;
}
*
!.gitignore
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<?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' => 'Laravel',
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your 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' => 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'),
/*
|--------------------------------------------------------------------------
| 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',
/*
|--------------------------------------------------------------------------
| 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',
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings 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 Settings: "single", "daily", "syslog", "errorlog"
|
*/
'log' => env('APP_LOG', 'single'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
/*
|--------------------------------------------------------------------------
| 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,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::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,
'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,
'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,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
],
];
<?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',
],
],
/*
|--------------------------------------------------------------------------
| 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\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,
],
],
];
<?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", "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_KEY'),
'secret' => env('PUSHER_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
<?php
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.
|
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
*/
'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.
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache'),
],
'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' => 'default',
],
],
/*
|--------------------------------------------------------------------------
| 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' => 'laravel',
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Additional Compiled Classes
|--------------------------------------------------------------------------
|
| Here you may specify additional classes to include in the compiled file
| generated by the `artisan optimize` command. These should be classes
| that are included on basically every request into the application.
|
*/
'files' => [
//
],
/*
|--------------------------------------------------------------------------
| Compiled File Providers
|--------------------------------------------------------------------------
|
| Here you may list service providers which define a "compiles" function
| that returns additional files that should be compiled, providing an
| easy way to get common files from any packages you are utilizing.
|
*/
'providers' => [
//
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/
'fetch' => PDO::FETCH_OBJ,
/*
|--------------------------------------------------------------------------
| 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', 'mysql'),
/*
|--------------------------------------------------------------------------
| 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',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
'engine' => null,
],
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
'sslmode' => 'prefer',
],
],
/*
|--------------------------------------------------------------------------
| 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 set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'cluster' => false,
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. A "local" driver, as well as a variety of cloud
| based drivers are available for your choosing. Just store away!
|
| Supported: "local", "ftp", "s3", "rackspace"
|
*/
'default' => 'local',
/*
|--------------------------------------------------------------------------
| Default Cloud Filesystem Disk
|--------------------------------------------------------------------------
|
| Many applications store files both locally and in the cloud. For this
| reason, you may specify a default "cloud" driver here. This driver
| will be bound as the Cloud disk implementation in the container.
|
*/
'cloud' => 's3',
/*
|--------------------------------------------------------------------------
| 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.
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => 'your-key',
'secret' => 'your-secret',
'region' => 'your-region',
'bucket' => 'your-bucket',
],
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill",
| "ses", "sparkpost", "log"
|
*/
'driver' => env('MAIL_DRIVER', 'smtp'),
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Mailgun mail service which will provide reliable deliveries.
|
*/
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587),
/*
|--------------------------------------------------------------------------
| 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' => 'hello@example.com',
'name' => 'Example',
],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
/*
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Driver
|--------------------------------------------------------------------------
|
| The Laravel queue API supports a variety of back-ends via an unified
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'default' => env('QUEUE_DRIVER', '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.
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
],
'sqs' => [
'driver' => 'sqs',
'key' => 'your-public-key',
'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
'queue' => 'your-queue-name',
'region' => 'us-east-1',
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'default',
'retry_after' => 90,
],
],
/*
|--------------------------------------------------------------------------
| 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' => [
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
];
<?php
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", "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' => 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' => 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
|--------------------------------------------------------------------------
|
| When using the "apc" or "memcached" session drivers, you may specify a
| cache store that should be used for these sessions. This value must
| correspond with one of the application's configured cache stores.
|
*/
'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' => '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 if it can not be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE', false),
/*
|--------------------------------------------------------------------------
| 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,
];
<?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' => [
realpath(base_path('resources/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' => realpath(storage_path('framework/views')),
];
*.sqlite
<?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/
$factory->define(App\User::class, function (Faker\Generator $faker) {
static $password;
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
];
});
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
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')->index();
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBlogTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blog_post', function(Blueprint $table){
$table->increments('id');
$table->string('title');
$table->string('description');
$table->string('images');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('blog_post');
}
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment