laravel base files
This commit is contained in:
4
Makefile
4
Makefile
@@ -7,6 +7,10 @@ CURR_PATH=$(shell pwd)
|
||||
|
||||
help:
|
||||
|
||||
all:
|
||||
composer install
|
||||
|
||||
install:
|
||||
|
||||
docker:
|
||||
@mkdir -p $(CURR_PATH)/tmp/mysql
|
||||
|
||||
28
README.md
Normal file → Executable file
28
README.md
Normal file → Executable file
@@ -1 +1,27 @@
|
||||
# phpvms_next
|
||||
# Laravel PHP Framework
|
||||
|
||||
[](https://travis-ci.org/laravel/framework)
|
||||
[](https://packagist.org/packages/laravel/framework)
|
||||
[](https://packagist.org/packages/laravel/framework)
|
||||
[](https://packagist.org/packages/laravel/framework)
|
||||
[](https://packagist.org/packages/laravel/framework)
|
||||
|
||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching.
|
||||
|
||||
Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.
|
||||
|
||||
## Official Documentation
|
||||
|
||||
Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs).
|
||||
|
||||
## Contributing
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions).
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## License
|
||||
|
||||
The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
|
||||
|
||||
40
app/Console/Kernel.php
Executable file
40
app/Console/Kernel.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
65
app/Exceptions/Handler.php
Executable file
65
app/Exceptions/Handler.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
30
app/Http/Controllers/AppBaseController.php
Normal file
30
app/Http/Controllers/AppBaseController.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use InfyOm\Generator\Utils\ResponseUtil;
|
||||
use Response;
|
||||
|
||||
/**
|
||||
* @SWG\Swagger(
|
||||
* basePath="/api/v1",
|
||||
* @SWG\Info(
|
||||
* title="Laravel Generator APIs",
|
||||
* version="1.0.0",
|
||||
* )
|
||||
* )
|
||||
* This class should be parent class for other API controllers
|
||||
* Class AppBaseController
|
||||
*/
|
||||
class AppBaseController extends Controller
|
||||
{
|
||||
public function sendResponse($result, $message)
|
||||
{
|
||||
return Response::json(ResponseUtil::makeResponse($message, $result));
|
||||
}
|
||||
|
||||
public function sendError($error, $code = 404)
|
||||
{
|
||||
return Response::json(ResponseUtil::makeError($error), $code);
|
||||
}
|
||||
}
|
||||
32
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file
32
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
39
app/Http/Controllers/Auth/LoginController.php
Executable file
39
app/Http/Controllers/Auth/LoginController.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?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 / registration.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest', ['except' => 'logout']);
|
||||
}
|
||||
}
|
||||
71
app/Http/Controllers/Auth/RegisterController.php
Executable file
71
app/Http/Controllers/Auth/RegisterController.php
Executable file
@@ -0,0 +1,71 @@
|
||||
<?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';
|
||||
|
||||
/**
|
||||
* 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',
|
||||
'email' => 'required|email|max:255|unique:users',
|
||||
'password' => 'required|min:6|confirmed',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
]);
|
||||
}
|
||||
}
|
||||
32
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
32
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
13
app/Http/Controllers/Controller.php
Executable file
13
app/Http/Controllers/Controller.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?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;
|
||||
}
|
||||
28
app/Http/Controllers/HomeController.php
Normal file
28
app/Http/Controllers/HomeController.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('home');
|
||||
}
|
||||
}
|
||||
56
app/Http/Kernel.php
Executable file
56
app/Http/Kernel.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?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,
|
||||
];
|
||||
}
|
||||
17
app/Http/Middleware/EncryptCookies.php
Executable file
17
app/Http/Middleware/EncryptCookies.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?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 = [
|
||||
//
|
||||
];
|
||||
}
|
||||
26
app/Http/Middleware/RedirectIfAuthenticated.php
Executable file
26
app/Http/Middleware/RedirectIfAuthenticated.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
17
app/Http/Middleware/VerifyCsrfToken.php
Executable file
17
app/Http/Middleware/VerifyCsrfToken.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?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 = [
|
||||
//
|
||||
];
|
||||
}
|
||||
28
app/Providers/AppServiceProvider.php
Executable file
28
app/Providers/AppServiceProvider.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?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()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
30
app/Providers/AuthServiceProvider.php
Executable file
30
app/Providers/AuthServiceProvider.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?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();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
26
app/Providers/BroadcastServiceProvider.php
Executable file
26
app/Providers/BroadcastServiceProvider.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?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;
|
||||
});
|
||||
}
|
||||
}
|
||||
32
app/Providers/EventServiceProvider.php
Executable file
32
app/Providers/EventServiceProvider.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?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();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
80
app/Providers/RouteServiceProvider.php
Executable file
80
app/Providers/RouteServiceProvider.php
Executable file
@@ -0,0 +1,80 @@
|
||||
<?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->mapWebRoutes();
|
||||
|
||||
$this->mapApiRoutes();
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* 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."\\API",
|
||||
'prefix' => 'api',
|
||||
'as' => 'api.',
|
||||
], function ($router) {
|
||||
require base_path('routes/api.php');
|
||||
});
|
||||
}
|
||||
}
|
||||
50
app/User.php
Executable file
50
app/User.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
|
||||
/**
|
||||
* App\User
|
||||
*
|
||||
* @property integer $id
|
||||
* @property string $name
|
||||
* @property string $email
|
||||
* @property string $password
|
||||
* @property string $remember_token
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
|
||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $unreadNotifications
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereName($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereEmail($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\User wherePassword($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereRememberToken($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\User whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email', 'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
}
|
||||
51
artisan
Executable file
51
artisan
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/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);
|
||||
55
bootstrap/app.php
Executable file
55
bootstrap/app.php
Executable file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The first thing we will do is create a new Laravel application instance
|
||||
| which serves as the "glue" for all the components of Laravel, and is
|
||||
| the IoC container for the system binding all of the various parts.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = new Illuminate\Foundation\Application(
|
||||
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;
|
||||
34
bootstrap/autoload.php
Executable file
34
bootstrap/autoload.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?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;
|
||||
}
|
||||
2
bootstrap/cache/.gitignore
vendored
Executable file
2
bootstrap/cache/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
58
composer.json
Executable file
58
composer.json
Executable file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "laravel/laravel",
|
||||
"description": "The Laravel Framework.",
|
||||
"keywords": ["framework", "laravel"],
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": ">=5.6.4",
|
||||
"laravel/framework": "5.3.*",
|
||||
"yajra/laravel-datatables-oracle": "~6.0",
|
||||
"barryvdh/laravel-ide-helper": "^2.1",
|
||||
"infyomlabs/laravel-generator": "5.3.x-dev",
|
||||
"laravelcollective/html": "dev-master",
|
||||
"infyomlabs/adminlte-templates": "5.3.x-dev",
|
||||
"infyomlabs/swagger-generator": "dev-master",
|
||||
"jlapp/swaggervel": "dev-master",
|
||||
"doctrine/dbal": "~2.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"
|
||||
}
|
||||
}
|
||||
4901
composer.lock
generated
Normal file
4901
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
236
config/app.php
Executable file
236
config/app.php
Executable file
@@ -0,0 +1,236 @@
|
||||
<?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' => 'My Application',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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...
|
||||
*/
|
||||
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
||||
Yajra\Datatables\DatatablesServiceProvider::class,
|
||||
Collective\Html\HtmlServiceProvider::class,
|
||||
Laracasts\Flash\FlashServiceProvider::class,
|
||||
Prettus\Repository\Providers\RepositoryServiceProvider::class,
|
||||
\InfyOm\Generator\InfyOmGeneratorServiceProvider::class,
|
||||
InfyOm\AdminLTETemplates\AdminLTETemplatesServiceProvider::class,
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
App\Providers\AppServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::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,
|
||||
'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,
|
||||
'Form' => Collective\Html\FormFacade::class,
|
||||
'Html' => Collective\Html\HtmlFacade::class,
|
||||
'Flash' => Laracasts\Flash\Flash::class
|
||||
],
|
||||
|
||||
];
|
||||
106
config/auth.php
Executable file
106
config/auth.php
Executable file
@@ -0,0 +1,106 @@
|
||||
<?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
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may set the options for resetting passwords including the view
|
||||
| that is your password reset e-mail. You may also set the name of the
|
||||
| table that maintains all of the reset tokens for your application.
|
||||
|
|
||||
| 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,
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
58
config/broadcasting.php
Executable file
58
config/broadcasting.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?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',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
91
config/cache.php
Executable file
91
config/cache.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<?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',
|
||||
|
||||
];
|
||||
35
config/compile.php
Executable file
35
config/compile.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?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' => [
|
||||
//
|
||||
],
|
||||
|
||||
];
|
||||
121
config/database.php
Executable file
121
config/database.php
Executable file
@@ -0,0 +1,121 @@
|
||||
<?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' => true,
|
||||
'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,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
86
config/datatables.php
Normal file
86
config/datatables.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/**
|
||||
* DataTables search options.
|
||||
*/
|
||||
'search' => [
|
||||
/**
|
||||
* Smart search will enclose search keyword with wildcard string "%keyword%".
|
||||
* SQL: column LIKE "%keyword%"
|
||||
*/
|
||||
'smart' => true,
|
||||
|
||||
/**
|
||||
* Case insensitive will search the keyword in lower case format.
|
||||
* SQL: LOWER(column) LIKE LOWER(keyword)
|
||||
*/
|
||||
'case_insensitive' => true,
|
||||
|
||||
/**
|
||||
* Wild card will add "%" in between every characters of the keyword.
|
||||
* SQL: column LIKE "%k%e%y%w%o%r%d%"
|
||||
*/
|
||||
'use_wildcards' => false,
|
||||
],
|
||||
|
||||
/**
|
||||
* DataTables fractal configurations.
|
||||
*/
|
||||
'fractal' => [
|
||||
/**
|
||||
* Request key name to parse includes on fractal.
|
||||
*/
|
||||
'includes' => 'include',
|
||||
|
||||
/**
|
||||
* Default fractal serializer.
|
||||
*/
|
||||
'serializer' => 'League\Fractal\Serializer\DataArraySerializer',
|
||||
],
|
||||
|
||||
/**
|
||||
* DataTables script view template.
|
||||
*/
|
||||
'script_template' => 'datatables::script',
|
||||
|
||||
/**
|
||||
* DataTables internal index id response column name.
|
||||
*/
|
||||
'index_column' => 'DT_Row_Index',
|
||||
|
||||
/**
|
||||
* Namespaces used by the generator.
|
||||
*/
|
||||
'namespace' => [
|
||||
/**
|
||||
* Base namespace/directory to create the new file.
|
||||
* This is appended on default Laravel namespace.
|
||||
*
|
||||
* Usage: php artisan datatables:make User
|
||||
* Output: App\DataTables\UserDataTable
|
||||
* With Model: App\User (default model)
|
||||
* Export filename: users_timestamp
|
||||
*/
|
||||
'base' => 'DataTables',
|
||||
|
||||
/**
|
||||
* Base namespace/directory where your model's are located.
|
||||
* This is appended on default Laravel namespace.
|
||||
*
|
||||
* Usage: php artisan datatables:make Post --model
|
||||
* Output: App\DataTables\PostDataTable
|
||||
* With Model: App\Post
|
||||
* Export filename: posts_timestamp
|
||||
*/
|
||||
'model' => '',
|
||||
],
|
||||
|
||||
/**
|
||||
* PDF generator to be used when converting the table to pdf.
|
||||
* Available generators: excel, snappy
|
||||
* Snappy package: barryvdh/laravel-snappy
|
||||
* Excel package: maatwebsite/excel
|
||||
*/
|
||||
'pdf_generator' => 'excel',
|
||||
];
|
||||
683
config/excel.php
Normal file
683
config/excel.php
Normal file
@@ -0,0 +1,683 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'cache' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable/Disable cell caching
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'enable' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Caching driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set the caching driver
|
||||
|
|
||||
| Available methods:
|
||||
| memory|gzip|serialized|igbinary|discISAM|apc|memcache|temp|wincache|sqlite|sqlite3
|
||||
|
|
||||
*/
|
||||
'driver' => 'memory',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'settings' => array(
|
||||
|
||||
'memoryCacheSize' => '32MB',
|
||||
'cacheTime' => 600
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Memcache settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'memcache' => array(
|
||||
|
||||
'host' => 'localhost',
|
||||
'port' => 11211,
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache dir (for discISAM)
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'dir' => storage_path('cache')
|
||||
),
|
||||
|
||||
'properties' => array(
|
||||
'creator' => 'Maatwebsite',
|
||||
'lastModifiedBy' => 'Maatwebsite',
|
||||
'title' => 'Spreadsheet',
|
||||
'description' => 'Default spreadsheet export',
|
||||
'subject' => 'Spreadsheet export',
|
||||
'keywords' => 'maatwebsite, excel, export',
|
||||
'category' => 'Excel',
|
||||
'manager' => 'Maatwebsite',
|
||||
'company' => 'Maatwebsite',
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sheets settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'sheets' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default page setup
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'pageSetup' => array(
|
||||
'orientation' => 'portrait',
|
||||
'paperSize' => '9',
|
||||
'scale' => '100',
|
||||
'fitToPage' => false,
|
||||
'fitToHeight' => true,
|
||||
'fitToWidth' => true,
|
||||
'columnsToRepeatAtLeft' => array('', ''),
|
||||
'rowsToRepeatAtTop' => array(0, 0),
|
||||
'horizontalCentered' => false,
|
||||
'verticalCentered' => false,
|
||||
'printArea' => null,
|
||||
'firstPageNumber' => null,
|
||||
),
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Creator
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default creator of a new Excel file
|
||||
|
|
||||
*/
|
||||
|
||||
'creator' => 'Maatwebsite',
|
||||
|
||||
'csv' => array(
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Delimiter
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default delimiter which will be used to read out a CSV file
|
||||
|
|
||||
*/
|
||||
|
||||
'delimiter' => ',',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enclosure
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'enclosure' => '"',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Line endings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'line_ending' => "\r\n"
|
||||
),
|
||||
|
||||
'export' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autosize columns
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Disable/enable column autosize or set the autosizing for
|
||||
| an array of columns ( array('A', 'B') )
|
||||
|
|
||||
*/
|
||||
'autosize' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autosize method
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| --> PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX
|
||||
| The default is based on an estimate, which does its calculation based
|
||||
| on the number of characters in the cell value (applying any calculation
|
||||
| and format mask, and allowing for wordwrap and rotation) and with an
|
||||
| "arbitrary" adjustment based on the font (Arial, Calibri or Verdana,
|
||||
| defaulting to Calibri if any other font is used) and a proportional
|
||||
| adjustment for the font size.
|
||||
|
|
||||
| --> PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT
|
||||
| The second method is more accurate, based on actual style formatting as
|
||||
| well (bold, italic, etc), and is calculated by generating a gd2 imagettf
|
||||
| bounding box and using its dimensions to determine the size; but this
|
||||
| method is significantly slower, and its accuracy is still dependent on
|
||||
| having the appropriate fonts installed.
|
||||
|
|
||||
*/
|
||||
'autosize-method' => PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Auto generate table heading
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If set to true, the array indices (or model attribute names)
|
||||
| will automatically be used as first row (table heading)
|
||||
|
|
||||
*/
|
||||
'generate_heading_by_indices' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Auto set alignment on merged cells
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'merged_cell_alignment' => 'left',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pre-calculate formulas during export
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'calculate' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Include Charts during export
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'includeCharts' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default sheet settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'sheets' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default page margin
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 1) When set to false, default margins will be used
|
||||
| 2) It's possible to enter a single margin which will
|
||||
| be used for all margins.
|
||||
| 3) Alternatively you can pass an array with 4 margins
|
||||
| Default order: array(top, right, bottom, left)
|
||||
|
|
||||
*/
|
||||
'page_margin' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Value in source array that stands for blank cell
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'nullValue' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Insert array starting from this cell address as the top left coordinate
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'startCell' => 'A1',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Apply strict comparison when testing for null values in the array
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'strictNullComparison' => false
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Store settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'store' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The path we want to save excel file to
|
||||
|
|
||||
*/
|
||||
'path' => storage_path('exports'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Return info
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Whether we want to return information about the stored file or not
|
||||
|
|
||||
*/
|
||||
'returnInfo' => false
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PDF Settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'pdf' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PDF Drivers
|
||||
|--------------------------------------------------------------------------
|
||||
| Supported: DomPDF, tcPDF, mPDF
|
||||
*/
|
||||
'driver' => 'DomPDF',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| PDF Driver settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'drivers' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DomPDF settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'DomPDF' => array(
|
||||
'path' => base_path('vendor/dompdf/dompdf/')
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| tcPDF settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'tcPDF' => array(
|
||||
'path' => base_path('vendor/tecnick.com/tcpdf/')
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| mPDF settings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'mPDF' => array(
|
||||
'path' => base_path('vendor/mpdf/mpdf/')
|
||||
),
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'filters' => array(
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register read filters
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'registered' => array(
|
||||
'chunk' => 'Maatwebsite\Excel\Filters\ChunkReadFilter'
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable certain filters for every file read
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'enabled' => array()
|
||||
),
|
||||
|
||||
'import' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Has heading
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The sheet has a heading (first) row which we can use as attribute names
|
||||
|
|
||||
| Options: true|false|slugged|slugged_with_count|ascii|numeric|hashed|trans|original
|
||||
|
|
||||
*/
|
||||
|
||||
'heading' => 'slugged',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| First Row with data or heading of data
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If the heading row is not the first row, or the data doesn't start
|
||||
| on the first row, here you can change the start row.
|
||||
|
|
||||
*/
|
||||
|
||||
'startRow' => 1,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cell name word separator
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default separator which is used for the cell names
|
||||
| Note: only applies to 'heading' settings 'true' && 'slugged'
|
||||
|
|
||||
*/
|
||||
|
||||
'separator' => '_',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Include Charts during import
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'includeCharts' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sheet heading conversion
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Convert headings to ASCII
|
||||
| Note: only applies to 'heading' settings 'true' && 'slugged'
|
||||
|
|
||||
*/
|
||||
|
||||
'to_ascii' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Import encoding
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'encoding' => array(
|
||||
|
||||
'input' => 'UTF-8',
|
||||
'output' => 'UTF-8'
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Calculate
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default cells with formulas will be calculated.
|
||||
|
|
||||
*/
|
||||
|
||||
'calculate' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Ignore empty cells
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default empty cells are not ignored
|
||||
|
|
||||
*/
|
||||
|
||||
'ignoreEmpty' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Force sheet collection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| For a sheet collection even when there is only 1 sheets.
|
||||
| When set to false and only 1 sheet found, the parsed file will return
|
||||
| a row collection instead of a sheet collection.
|
||||
| When set to true, it will return a sheet collection instead.
|
||||
|
|
||||
*/
|
||||
'force_sheets_collection' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Date format
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The format dates will be parsed to
|
||||
|
|
||||
*/
|
||||
|
||||
'dates' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable/disable date formatting
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'enabled' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default date format
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If set to false, a carbon object will return
|
||||
|
|
||||
*/
|
||||
'format' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Date columns
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'columns' => array()
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Import sheets by config
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'sheets' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Example sheet
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Example sheet "test" will grab the firstname at cell A2
|
||||
|
|
||||
*/
|
||||
|
||||
'test' => array(
|
||||
|
||||
'firstname' => 'A2'
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
),
|
||||
|
||||
'views' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Styles
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default styles which will be used when parsing a view
|
||||
|
|
||||
*/
|
||||
|
||||
'styles' => array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Table headings
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'th' => array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
'size' => 12,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Strong tags
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'strong' => array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
'size' => 12,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bold tags
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'b' => array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
'size' => 12,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Italic tags
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'i' => array(
|
||||
'font' => array(
|
||||
'italic' => true,
|
||||
'size' => 12,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Heading 1
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'h1' => array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
'size' => 24,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Heading 2
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'h2' => array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
'size' => 18,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Heading 2
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'h3' => array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
'size' => 13.5,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Heading 4
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'h4' => array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
'size' => 12,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Heading 5
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'h5' => array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
'size' => 10,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Heading 6
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'h6' => array(
|
||||
'font' => array(
|
||||
'bold' => true,
|
||||
'size' => 7.5,
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Hyperlinks
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'a' => array(
|
||||
'font' => array(
|
||||
'underline' => true,
|
||||
'color' => array('argb' => 'FF0000FF'),
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Horizontal rules
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'hr' => array(
|
||||
'borders' => array(
|
||||
'bottom' => array(
|
||||
'style' => 'thin',
|
||||
'color' => array('FF000000')
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
67
config/filesystems.php
Executable file
67
config/filesystems.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?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',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
145
config/ide-helper.php
Normal file
145
config/ide-helper.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filename & Format
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default filename (without extension) and the format (php or json)
|
||||
|
|
||||
*/
|
||||
|
||||
'filename' => '_ide_helper',
|
||||
'format' => 'php',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Helper files to include
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Include helper files. By default not included, but can be toggled with the
|
||||
| -- helpers (-H) option. Extra helper files can be included.
|
||||
|
|
||||
*/
|
||||
|
||||
'include_helpers' => false,
|
||||
|
||||
'helper_files' => array(
|
||||
base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model locations to include
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Define in which directories the ide-helper:models command should look
|
||||
| for models.
|
||||
|
|
||||
*/
|
||||
|
||||
'model_locations' => array(
|
||||
'app',
|
||||
),
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Extra classes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These implementations are not really extended, but called with magic functions
|
||||
|
|
||||
*/
|
||||
|
||||
'extra' => array(
|
||||
'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'),
|
||||
'Session' => array('Illuminate\Session\Store'),
|
||||
),
|
||||
|
||||
'magic' => array(
|
||||
'Log' => array(
|
||||
'debug' => 'Monolog\Logger::addDebug',
|
||||
'info' => 'Monolog\Logger::addInfo',
|
||||
'notice' => 'Monolog\Logger::addNotice',
|
||||
'warning' => 'Monolog\Logger::addWarning',
|
||||
'error' => 'Monolog\Logger::addError',
|
||||
'critical' => 'Monolog\Logger::addCritical',
|
||||
'alert' => 'Monolog\Logger::addAlert',
|
||||
'emergency' => 'Monolog\Logger::addEmergency',
|
||||
)
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Interface implementations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These interfaces will be replaced with the implementing class. Some interfaces
|
||||
| are detected by the helpers, others can be listed below.
|
||||
|
|
||||
*/
|
||||
|
||||
'interfaces' => array(
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Support for custom DB types
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This setting allow you to map any custom database type (that you may have
|
||||
| created using CREATE TYPE statement or imported using database plugin
|
||||
| / extension to a Doctrine type.
|
||||
|
|
||||
| Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are:
|
||||
| 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql'
|
||||
|
|
||||
| This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant
|
||||
|
|
||||
| The value of the array is an array of type mappings. Key is the name of the custom type,
|
||||
| (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in
|
||||
| our case it is 'json_array'. Doctrine types are listed here:
|
||||
| http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html
|
||||
|
|
||||
| So to support jsonb in your models when working with Postgres, just add the following entry to the array below:
|
||||
|
|
||||
| "postgresql" => array(
|
||||
| "jsonb" => "json_array",
|
||||
| ),
|
||||
|
|
||||
*/
|
||||
'custom_db_types' => array(
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Support for camel cased models
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| There are some Laravel packages (such as Eloquence) that allow for accessing
|
||||
| Eloquent model properties via camel case, instead of snake case.
|
||||
|
|
||||
| Enabling this option will support these packages by saving all model
|
||||
| properties as camel case, instead of snake case.
|
||||
|
|
||||
| For example, normally you would see this:
|
||||
|
|
||||
| * @property \Carbon\Carbon $created_at
|
||||
| * @property \Carbon\Carbon $updated_at
|
||||
|
|
||||
| With this enabled, the properties will be this:
|
||||
|
|
||||
| * @property \Carbon\Carbon $createdAt
|
||||
| * @property \Carbon\Carbon $updatedAt
|
||||
|
|
||||
| Note, it is currently an all-or-nothing option.
|
||||
|
|
||||
*/
|
||||
'model_camel_case_properties' => false,
|
||||
|
||||
);
|
||||
175
config/infyom/laravel_generator.php
Normal file
175
config/infyom/laravel_generator.php
Normal file
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => [
|
||||
|
||||
'migration' => base_path('database/migrations/'),
|
||||
|
||||
'model' => app_path('Models/'),
|
||||
|
||||
'datatables' => app_path('DataTables/'),
|
||||
|
||||
'repository' => app_path('Repositories/'),
|
||||
|
||||
'routes' => base_path('routes/web.php'),
|
||||
|
||||
'api_routes' => base_path('routes/api.php'),
|
||||
|
||||
'request' => app_path('Http/Requests/'),
|
||||
|
||||
'api_request' => app_path('Http/Requests/API/'),
|
||||
|
||||
'controller' => app_path('Http/Controllers/'),
|
||||
|
||||
'api_controller' => app_path('Http/Controllers/API/'),
|
||||
|
||||
'test_trait' => base_path('tests/traits/'),
|
||||
|
||||
'repository_test' => base_path('tests/'),
|
||||
|
||||
'api_test' => base_path('tests/'),
|
||||
|
||||
'views' => base_path('resources/views/'),
|
||||
|
||||
'schema_files' => base_path('resources/model_schemas/'),
|
||||
|
||||
'templates_dir' => base_path('resources/infyom/infyom-generator-templates/'),
|
||||
|
||||
'modelJs' => base_path('resources/assets/js/models/'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Namespaces
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'namespace' => [
|
||||
|
||||
'model' => 'App\Models',
|
||||
|
||||
'datatables' => 'App\DataTables',
|
||||
|
||||
'repository' => 'App\Repositories',
|
||||
|
||||
'controller' => 'App\Http\Controllers',
|
||||
|
||||
'api_controller' => 'App\Http\Controllers\API',
|
||||
|
||||
'request' => 'App\Http\Requests',
|
||||
|
||||
'api_request' => 'App\Http\Requests\API',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Templates
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'templates' => 'adminlte-templates',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model extend class
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'model_extend_class' => 'Eloquent',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API routes prefix & version
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'api_prefix' => 'api',
|
||||
|
||||
'api_version' => 'v1',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'options' => [
|
||||
|
||||
'softDelete' => true,
|
||||
|
||||
'tables_searchable_default' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Prefixes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'prefixes' => [
|
||||
|
||||
'route' => '', // using admin will create route('admin.?.index') type routes
|
||||
|
||||
'path' => '',
|
||||
|
||||
'view' => '', // using backend will create return view('backend.?.index') type the backend views directory
|
||||
|
||||
'public' => '',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Add-Ons
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'add_on' => [
|
||||
|
||||
'swagger' => false,
|
||||
|
||||
'tests' => true,
|
||||
|
||||
'datatables' => false,
|
||||
|
||||
'menu' => [
|
||||
|
||||
'enabled' => false,
|
||||
|
||||
'menu_file' => 'layouts/menu.blade.php',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Timestamp Fields
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'timestamps' => [
|
||||
|
||||
'enabled' => true,
|
||||
|
||||
'created_at' => 'created_at',
|
||||
|
||||
'updated_at' => 'updated_at',
|
||||
|
||||
'deleted_at' => 'deleted_at',
|
||||
],
|
||||
|
||||
];
|
||||
115
config/mail.php
Executable file
115
config/mail.php
Executable file
@@ -0,0 +1,115 @@
|
||||
<?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',
|
||||
|
||||
];
|
||||
85
config/queue.php
Executable file
85
config/queue.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?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',
|
||||
],
|
||||
|
||||
];
|
||||
237
config/repository.php
Normal file
237
config/repository.php
Normal file
@@ -0,0 +1,237 @@
|
||||
<?php
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Prettus Repository Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
|
|
||||
*/
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Repository Pagination Limit Default
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'pagination' => [
|
||||
'limit' => 15
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Fractal Presenter Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
|
||||
Available serializers:
|
||||
ArraySerializer
|
||||
DataArraySerializer
|
||||
JsonApiSerializer
|
||||
|
||||
*/
|
||||
'fractal' => [
|
||||
'params' => [
|
||||
'include' => 'include'
|
||||
],
|
||||
'serializer' => League\Fractal\Serializer\DataArraySerializer::class
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'cache' => [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Status
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enable or disable cache
|
||||
|
|
||||
*/
|
||||
'enabled' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Minutes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Time of expiration cache
|
||||
|
|
||||
*/
|
||||
'minutes' => 30,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Repository
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Instance of Illuminate\Contracts\Cache\Repository
|
||||
|
|
||||
*/
|
||||
'repository' => 'cache',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Clean Listener
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
|
|
||||
|
|
||||
*/
|
||||
'clean' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable clear cache on repository changes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'enabled' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Actions in Repository
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| create : Clear Cache on create Entry in repository
|
||||
| update : Clear Cache on update Entry in repository
|
||||
| delete : Clear Cache on delete Entry in repository
|
||||
|
|
||||
*/
|
||||
'on' => [
|
||||
'create' => true,
|
||||
'update' => true,
|
||||
'delete' => true,
|
||||
]
|
||||
],
|
||||
|
||||
'params' => [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Skip Cache Params
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
|
|
||||
| Ex: http://prettus.local/?search=lorem&skipCache=true
|
||||
|
|
||||
*/
|
||||
'skipCache' => 'skipCache'
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Methods Allowed
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| methods cacheable : all, paginate, find, findByField, findWhere, getByCriteria
|
||||
|
|
||||
| Ex:
|
||||
|
|
||||
| 'only' =>['all','paginate'],
|
||||
|
|
||||
| or
|
||||
|
|
||||
| 'except' =>['find'],
|
||||
*/
|
||||
'allowed' => [
|
||||
'only' => null,
|
||||
'except' => null
|
||||
]
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Criteria Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Settings of request parameters names that will be used by Criteria
|
||||
|
|
||||
*/
|
||||
'criteria' => [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Accepted Conditions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Conditions accepted in consultations where the Criteria
|
||||
|
|
||||
| Ex:
|
||||
|
|
||||
| 'acceptedConditions'=>['=','like']
|
||||
|
|
||||
| $query->where('foo','=','bar')
|
||||
| $query->where('foo','like','bar')
|
||||
|
|
||||
*/
|
||||
'acceptedConditions' => [
|
||||
'=',
|
||||
'like'
|
||||
],
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Request Params
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Request parameters that will be used to filter the query in the repository
|
||||
|
|
||||
| Params :
|
||||
|
|
||||
| - search : Searched value
|
||||
| Ex: http://prettus.local/?search=lorem
|
||||
|
|
||||
| - searchFields : Fields in which research should be carried out
|
||||
| Ex:
|
||||
| http://prettus.local/?search=lorem&searchFields=name;email
|
||||
| http://prettus.local/?search=lorem&searchFields=name:like;email
|
||||
| http://prettus.local/?search=lorem&searchFields=name:like
|
||||
|
|
||||
| - filter : Fields that must be returned to the response object
|
||||
| Ex:
|
||||
| http://prettus.local/?search=lorem&filter=id,name
|
||||
|
|
||||
| - orderBy : Order By
|
||||
| Ex:
|
||||
| http://prettus.local/?search=lorem&orderBy=id
|
||||
|
|
||||
| - sortedBy : Sort
|
||||
| Ex:
|
||||
| http://prettus.local/?search=lorem&orderBy=id&sortedBy=asc
|
||||
| http://prettus.local/?search=lorem&orderBy=id&sortedBy=desc
|
||||
|
|
||||
*/
|
||||
'params' => [
|
||||
'search' => 'search',
|
||||
'searchFields' => 'searchFields',
|
||||
'filter' => 'filter',
|
||||
'orderBy' => 'orderBy',
|
||||
'sortedBy' => 'sortedBy',
|
||||
'with' => 'with'
|
||||
]
|
||||
],
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Generator Config
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'generator' => [
|
||||
'basePath' => app_path(),
|
||||
'rootNamespace' => 'App\\',
|
||||
'paths' => [
|
||||
'models' => 'Entities',
|
||||
'repositories' => 'Repositories',
|
||||
'interfaces' => 'Repositories',
|
||||
'transformers' => 'Transformers',
|
||||
'presenters' => 'Presenters',
|
||||
'validators' => 'Validators',
|
||||
'controllers' => 'Http/Controllers',
|
||||
'provider' => 'RepositoryServiceProvider',
|
||||
'criteria' => 'Criteria',
|
||||
'stubsOverridePath' => app_path()
|
||||
]
|
||||
]
|
||||
];
|
||||
38
config/services.php
Executable file
38
config/services.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?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'),
|
||||
],
|
||||
|
||||
];
|
||||
179
config/session.php
Executable file
179
config/session.php
Executable file
@@ -0,0 +1,179 @@
|
||||
<?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' => 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,
|
||||
|
||||
];
|
||||
33
config/view.php
Executable file
33
config/view.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?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')),
|
||||
|
||||
];
|
||||
1
database/.gitignore
vendored
Executable file
1
database/.gitignore
vendored
Executable file
@@ -0,0 +1 @@
|
||||
*.sqlite
|
||||
23
database/factories/ModelFactory.php
Executable file
23
database/factories/ModelFactory.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?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->safeEmail,
|
||||
'password' => $password ?: $password = bcrypt('secret'),
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
});
|
||||
1
database/migrations/.gitkeep
Executable file
1
database/migrations/.gitkeep
Executable file
@@ -0,0 +1 @@
|
||||
|
||||
35
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
35
database/migrations/2014_10_12_000000_create_users_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
32
database/migrations/2014_10_12_100000_create_password_resets_table.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
1
database/seeds/.gitkeep
Executable file
1
database/seeds/.gitkeep
Executable file
@@ -0,0 +1 @@
|
||||
|
||||
16
database/seeds/DatabaseSeeder.php
Executable file
16
database/seeds/DatabaseSeeder.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// $this->call(UsersTableSeeder::class);
|
||||
}
|
||||
}
|
||||
19
gulpfile.js
Executable file
19
gulpfile.js
Executable file
@@ -0,0 +1,19 @@
|
||||
const elixir = require('laravel-elixir');
|
||||
|
||||
require('laravel-elixir-vue');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Elixir Asset Management
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
|
||||
| for your Laravel application. By default, we are compiling the Sass
|
||||
| file for our application, as well as publishing vendor resources.
|
||||
|
|
||||
*/
|
||||
|
||||
elixir(mix => {
|
||||
mix.sass('app.scss')
|
||||
.webpack('app.js');
|
||||
});
|
||||
18
package.json
Executable file
18
package.json
Executable file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"prod": "gulp --production",
|
||||
"dev": "gulp watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bootstrap-sass": "^3.3.7",
|
||||
"gulp": "^3.9.1",
|
||||
"jquery": "^3.1.0",
|
||||
"laravel-elixir": "^6.0.0-9",
|
||||
"laravel-elixir-vue": "^0.1.4",
|
||||
"laravel-elixir-webpack-official": "^1.0.2",
|
||||
"lodash": "^4.14.0",
|
||||
"vue": "^1.0.26",
|
||||
"vue-resource": "^0.9.3"
|
||||
}
|
||||
}
|
||||
27
phpunit.xml
Executable file
27
phpunit.xml
Executable file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="bootstrap/autoload.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false">
|
||||
<testsuites>
|
||||
<testsuite name="Application Test Suite">
|
||||
<directory suffix="Test.php">./tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./app</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<php>
|
||||
<env name="APP_ENV" value="testing"/>
|
||||
<env name="CACHE_DRIVER" value="array"/>
|
||||
<env name="SESSION_DRIVER" value="array"/>
|
||||
<env name="QUEUE_DRIVER" value="sync"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
20
public/.htaccess
Executable file
20
public/.htaccess
Executable file
@@ -0,0 +1,20 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||||
|
||||
# Handle Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
</IfModule>
|
||||
5
public/css/app.css
Executable file
5
public/css/app.css
Executable file
File diff suppressed because one or more lines are too long
0
public/favicon.ico
Executable file
0
public/favicon.ico
Executable file
58
public/index.php
Executable file
58
public/index.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Laravel - A PHP Framework For Web Artisans
|
||||
*
|
||||
* @package Laravel
|
||||
* @author Taylor Otwell <taylor@laravel.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader for
|
||||
| our application. We just need to utilize it! We'll simply require it
|
||||
| into the script here so that we don't have to worry about manual
|
||||
| loading any of our classes later on. It feels nice to relax.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/../bootstrap/autoload.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Turn On The Lights
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| We need to illuminate PHP development, so let us turn on the lights.
|
||||
| This bootstraps the framework and gets it ready for use, then it
|
||||
| will load up this application so that we can run it and send
|
||||
| the responses back to the browser and delight our users.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once we have the application, we can handle the incoming request
|
||||
| through the kernel, and send the associated response back to
|
||||
| the client's browser allowing them to enjoy the creative
|
||||
| and wonderful application we have prepared for them.
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
||||
|
||||
$response = $kernel->handle(
|
||||
$request = Illuminate\Http\Request::capture()
|
||||
);
|
||||
|
||||
$response->send();
|
||||
|
||||
$kernel->terminate($request, $response);
|
||||
10
public/js/app.js
Executable file
10
public/js/app.js
Executable file
File diff suppressed because one or more lines are too long
2
public/robots.txt
Executable file
2
public/robots.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow:
|
||||
20
resources/assets/js/app.js
Executable file
20
resources/assets/js/app.js
Executable file
@@ -0,0 +1,20 @@
|
||||
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* include Vue and Vue Resource. This gives a great starting point for
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
|
||||
require('./bootstrap');
|
||||
|
||||
/**
|
||||
* Next, we will create a fresh Vue application instance and attach it to
|
||||
* the body of the page. From here, you may begin adding components to
|
||||
* the application, or feel free to tweak this setup for your needs.
|
||||
*/
|
||||
|
||||
Vue.component('example', require('./components/Example.vue'));
|
||||
|
||||
const app = new Vue({
|
||||
el: 'body'
|
||||
});
|
||||
45
resources/assets/js/bootstrap.js
vendored
Executable file
45
resources/assets/js/bootstrap.js
vendored
Executable file
@@ -0,0 +1,45 @@
|
||||
|
||||
window._ = require('lodash');
|
||||
|
||||
/**
|
||||
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
||||
* for JavaScript based Bootstrap features such as modals and tabs. This
|
||||
* code may be modified to fit the specific needs of your application.
|
||||
*/
|
||||
|
||||
window.$ = window.jQuery = require('jquery');
|
||||
require('bootstrap-sass');
|
||||
|
||||
/**
|
||||
* Vue is a modern JavaScript library for building interactive web interfaces
|
||||
* using reactive data binding and reusable components. Vue's API is clean
|
||||
* and simple, leaving you to focus on building your next great project.
|
||||
*/
|
||||
|
||||
window.Vue = require('vue');
|
||||
require('vue-resource');
|
||||
|
||||
/**
|
||||
* We'll register a HTTP interceptor to attach the "CSRF" header to each of
|
||||
* the outgoing requests issued by this application. The CSRF middleware
|
||||
* included with Laravel will automatically verify the header's value.
|
||||
*/
|
||||
|
||||
Vue.http.interceptors.push((request, next) => {
|
||||
request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken;
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||
* allows your team to easily build robust real-time web applications.
|
||||
*/
|
||||
|
||||
// import Echo from "laravel-echo"
|
||||
|
||||
// window.Echo = new Echo({
|
||||
// broadcaster: 'pusher',
|
||||
// key: 'your-pusher-key'
|
||||
// });
|
||||
23
resources/assets/js/components/Example.vue
Executable file
23
resources/assets/js/components/Example.vue
Executable file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Example Component</div>
|
||||
|
||||
<div class="panel-body">
|
||||
I'm an example component!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
ready() {
|
||||
console.log('Component ready.')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
9
resources/assets/sass/app.scss
Executable file
9
resources/assets/sass/app.scss
Executable file
@@ -0,0 +1,9 @@
|
||||
|
||||
// Fonts
|
||||
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
|
||||
|
||||
// Variables
|
||||
@import "variables";
|
||||
|
||||
// Bootstrap
|
||||
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
|
||||
37
resources/assets/sass/variables.scss
Executable file
37
resources/assets/sass/variables.scss
Executable file
@@ -0,0 +1,37 @@
|
||||
|
||||
// Body
|
||||
$body-bg: #f5f8fa;
|
||||
|
||||
// Borders
|
||||
$laravel-border-color: darken($body-bg, 10%);
|
||||
$list-group-border: $laravel-border-color;
|
||||
$navbar-default-border: $laravel-border-color;
|
||||
$panel-default-border: $laravel-border-color;
|
||||
$panel-inner-border: $laravel-border-color;
|
||||
|
||||
// Brands
|
||||
$brand-primary: #3097D1;
|
||||
$brand-info: #8eb4cb;
|
||||
$brand-success: #2ab27b;
|
||||
$brand-warning: #cbb956;
|
||||
$brand-danger: #bf5329;
|
||||
|
||||
// Typography
|
||||
$font-family-sans-serif: "Raleway", sans-serif;
|
||||
$font-size-base: 14px;
|
||||
$line-height-base: 1.6;
|
||||
$text-color: #636b6f;
|
||||
|
||||
// Navbar
|
||||
$navbar-default-bg: #fff;
|
||||
|
||||
// Buttons
|
||||
$btn-default-color: $text-color;
|
||||
|
||||
// Inputs
|
||||
$input-border: lighten($text-color, 40%);
|
||||
$input-border-focus: lighten($brand-primary, 25%);
|
||||
$input-color-placeholder: lighten($text-color, 30%);
|
||||
|
||||
// Panels
|
||||
$panel-default-heading-bg: #fff;
|
||||
19
resources/lang/en/auth.php
Executable file
19
resources/lang/en/auth.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user. You are free to modify
|
||||
| these language lines according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => 'These credentials do not match our records.',
|
||||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||
|
||||
];
|
||||
19
resources/lang/en/pagination.php
Executable file
19
resources/lang/en/pagination.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Previous',
|
||||
'next' => 'Next »',
|
||||
|
||||
];
|
||||
22
resources/lang/en/passwords.php
Executable file
22
resources/lang/en/passwords.php
Executable file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => 'Passwords must be at least six characters and match the confirmation.',
|
||||
'reset' => 'Your password has been reset!',
|
||||
'sent' => 'We have e-mailed your password reset link!',
|
||||
'token' => 'This password reset token is invalid.',
|
||||
'user' => "We can't find a user with that e-mail address.",
|
||||
|
||||
];
|
||||
115
resources/lang/en/validation.php
Executable file
115
resources/lang/en/validation.php
Executable file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
|
||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||
'array' => 'The :attribute must be an array.',
|
||||
'before' => 'The :attribute must be a date before :date.',
|
||||
'between' => [
|
||||
'numeric' => 'The :attribute must be between :min and :max.',
|
||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||
'string' => 'The :attribute must be between :min and :max characters.',
|
||||
'array' => 'The :attribute must have between :min and :max items.',
|
||||
],
|
||||
'boolean' => 'The :attribute field must be true or false.',
|
||||
'confirmed' => 'The :attribute confirmation does not match.',
|
||||
'date' => 'The :attribute is not a valid date.',
|
||||
'date_format' => 'The :attribute does not match the format :format.',
|
||||
'different' => 'The :attribute and :other must be different.',
|
||||
'digits' => 'The :attribute must be :digits digits.',
|
||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'email' => 'The :attribute must be a valid email address.',
|
||||
'exists' => 'The selected :attribute is invalid.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field is required.',
|
||||
'image' => 'The :attribute must be an image.',
|
||||
'in' => 'The selected :attribute is invalid.',
|
||||
'in_array' => 'The :attribute field does not exist in :other.',
|
||||
'integer' => 'The :attribute must be an integer.',
|
||||
'ip' => 'The :attribute must be a valid IP address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute may not be greater than :max.',
|
||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||
'string' => 'The :attribute may not be greater than :max characters.',
|
||||
'array' => 'The :attribute may not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'The :attribute must be at least :min.',
|
||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||
'string' => 'The :attribute must be at least :min characters.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute and :other must match.',
|
||||
'size' => [
|
||||
'numeric' => 'The :attribute must be :size.',
|
||||
'file' => 'The :attribute must be :size kilobytes.',
|
||||
'string' => 'The :attribute must be :size characters.',
|
||||
'array' => 'The :attribute must contain :size items.',
|
||||
],
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'url' => 'The :attribute format is invalid.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
|
||||
];
|
||||
1
resources/views/auth/emails/password.blade.php
Normal file
1
resources/views/auth/emails/password.blade.php
Normal file
@@ -0,0 +1 @@
|
||||
Click here to reset your password: <a href="{{ $link = url('password/reset', $token).'?email='.urlencode($user->getEmailForPasswordReset()) }}"> {{ $link }} </a>
|
||||
97
resources/views/auth/login.blade.php
Normal file
97
resources/views/auth/login.blade.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>InfyOm Laravel Generator</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/AdminLTE.min.css">
|
||||
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/skins/_all-skins.min.css">
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="{{ url('/home') }}"><b>InfyOm </b>Generator</a>
|
||||
</div>
|
||||
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Sign In</p>
|
||||
|
||||
<form method="post" action="{{ url('/login') }}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div class="form-group has-feedback {{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email">
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<input type="password" class="form-control" placeholder="Password" name="password">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
@if ($errors->has('password'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="remember"> Remember Me
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-xs-4">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<a href="{{ url('/password/reset') }}">I forgot my password</a><br>
|
||||
<a href="{{ url('/register') }}" class="text-center">Register a new membership</a>
|
||||
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
|
||||
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- AdminLTE App -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/js/app.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
84
resources/views/auth/passwords/email.blade.php
Normal file
84
resources/views/auth/passwords/email.blade.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>InfyOm Laravel Generator</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/AdminLTE.min.css">
|
||||
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/skins/_all-skins.min.css">
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="{{ url('/home') }}"><b>InfyOm </b>Generator</a>
|
||||
</div>
|
||||
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Enter Email to reset password</p>
|
||||
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="post" action="{{ url('/password/email') }}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div class="form-group has-feedback {{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email">
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<button type="submit" class="btn btn-primary pull-right">
|
||||
<i class="fa fa-btn fa-envelope"></i> Send Password Reset Link
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
|
||||
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- AdminLTE App -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/js/app.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
109
resources/views/auth/passwords/reset.blade.php
Normal file
109
resources/views/auth/passwords/reset.blade.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>InfyOm Laravel Generator</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/AdminLTE.min.css">
|
||||
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/skins/_all-skins.min.css">
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="{{ url('/home') }}"><b>InfyOm </b>Generator</a>
|
||||
</div>
|
||||
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Reset your password</p>
|
||||
|
||||
<form method="post" action="{{ url('/password/reset') }}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
<div class="form-group has-feedback {{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email">
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<input type="password" class="form-control" name="password" placeholder="Password">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
|
||||
@if ($errors->has('password'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
|
||||
<input type="password" name="password_confirmation" class="form-control" placeholder="Confirm password">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
|
||||
@if ($errors->has('password_confirmation'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<button type="submit" class="btn btn-primary pull-right">
|
||||
<i class="fa fa-btn fa-refresh"></i>Reset Password
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
|
||||
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/icheck.min.js"></script>
|
||||
|
||||
<!-- AdminLTE App -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/js/app.min.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
132
resources/views/auth/register.blade.php
Normal file
132
resources/views/auth/register.blade.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>InfyOm Laravel Generator | Registration Page</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
|
||||
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/AdminLTE.min.css">
|
||||
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/skins/_all-skins.min.css">
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body class="hold-transition register-page">
|
||||
<div class="register-box">
|
||||
<div class="register-logo">
|
||||
<a href="{{ url('/home') }}"><b>InfyOm </b>Generator</a>
|
||||
</div>
|
||||
|
||||
<div class="register-box-body">
|
||||
<p class="login-box-msg">Register a new membership</p>
|
||||
|
||||
<form method="post" action="{{ url('/register') }}">
|
||||
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<input type="text" class="form-control" name="name" value="{{ old('name') }}" placeholder="Full Name">
|
||||
<span class="glyphicon glyphicon-user form-control-feedback"></span>
|
||||
|
||||
@if ($errors->has('name'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('name') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="Email">
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<input type="password" class="form-control" name="password" placeholder="Password">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
|
||||
@if ($errors->has('password'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
|
||||
<input type="password" name="password_confirmation" class="form-control" placeholder="Confirm password">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
|
||||
@if ($errors->has('password_confirmation'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="checkbox icheck">
|
||||
<label>
|
||||
<input type="checkbox"> I agree to the <a href="#">terms</a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-xs-4">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">Register</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<a href="{{ url('/login') }}" class="text-center">I already have a membership</a>
|
||||
</div>
|
||||
<!-- /.form-box -->
|
||||
</div>
|
||||
<!-- /.register-box -->
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
|
||||
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.2/icheck.min.js"></script>
|
||||
|
||||
<!-- AdminLTE App -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/js/app.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
47
resources/views/errors/503.blade.php
Executable file
47
resources/views/errors/503.blade.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Be right back.</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
color: #B0BEC5;
|
||||
display: table;
|
||||
font-weight: 100;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 72px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="title">Be right back.</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
10
resources/views/home.blade.php
Normal file
10
resources/views/home.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
151
resources/views/layouts/app.blade.php
Normal file
151
resources/views/layouts/app.blade.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>InfyOm Generator</title>
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
|
||||
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/css/select2.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/AdminLTE.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/skins/_all-skins.min.css">
|
||||
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||
|
||||
@yield('css')
|
||||
</head>
|
||||
|
||||
<body class="skin-blue sidebar-mini">
|
||||
@if (!Auth::guest())
|
||||
<div class="wrapper">
|
||||
<!-- Main Header -->
|
||||
<header class="main-header">
|
||||
|
||||
<!-- Logo -->
|
||||
<a href="#" class="logo">
|
||||
<b>InfyOm</b>
|
||||
</a>
|
||||
|
||||
<!-- Header Navbar -->
|
||||
<nav class="navbar navbar-static-top" role="navigation">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
</a>
|
||||
<!-- Navbar Right Menu -->
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<!-- User Account Menu -->
|
||||
<li class="dropdown user user-menu">
|
||||
<!-- Menu Toggle Button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<!-- The user image in the navbar-->
|
||||
<img src="http://infyom.com/images/logo/blue_logo_150x150.jpg"
|
||||
class="user-image" alt="User Image"/>
|
||||
<!-- hidden-xs hides the username on small devices so only the image appears. -->
|
||||
<span class="hidden-xs">{!! Auth::user()->name !!}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- The user image in the menu -->
|
||||
<li class="user-header">
|
||||
<img src="http://infyom.com/images/logo/blue_logo_150x150.jpg"
|
||||
class="img-circle" alt="User Image"/>
|
||||
<p>
|
||||
{!! Auth::user()->name !!}
|
||||
<small>Member since {!! Auth::user()->created_at->format('M. Y') !!}</small>
|
||||
</p>
|
||||
</li>
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
<a href="#" class="btn btn-default btn-flat">Profile</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{!! url('/logout') !!}" class="btn btn-default btn-flat"
|
||||
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
||||
Sign out
|
||||
</a>
|
||||
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
|
||||
{{ csrf_field() }}
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
@include('layouts.sidebar')
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
@yield('content')
|
||||
</div>
|
||||
|
||||
<!-- Main Footer -->
|
||||
<footer class="main-footer" style="max-height: 100px;text-align: center">
|
||||
<strong>Copyright © 2016 <a href="#">Company</a>.</strong> All rights reserved.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
@else
|
||||
<nav class="navbar navbar-default navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
|
||||
<!-- Collapsed Hamburger -->
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
|
||||
data-target="#app-navbar-collapse">
|
||||
<span class="sr-only">Toggle Navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
<!-- Branding Image -->
|
||||
<a class="navbar-brand" href="{!! url('/') !!}">
|
||||
InfyOm Generator
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="app-navbar-collapse">
|
||||
<!-- Left Side Of Navbar -->
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="{!! url('/home') !!}">Home</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Right Side Of Navbar -->
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<!-- Authentication Links -->
|
||||
<li><a href="{!! url('/login') !!}">Login</a></li>
|
||||
<li><a href="{!! url('/register') !!}">Register</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div id="page-content-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@yield('content')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- jQuery 2.1.4 -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
|
||||
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/js/select2.min.js"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/js/app.min.js"></script>
|
||||
|
||||
@yield('scripts')
|
||||
</body>
|
||||
</html>
|
||||
4
resources/views/layouts/datatables_css.blade.php
Normal file
4
resources/views/layouts/datatables_css.blade.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<!-- DataTable Bootstrap -->
|
||||
<link href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="//cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.2.2/css/buttons.bootstrap.min.css">
|
||||
7
resources/views/layouts/datatables_js.blade.php
Normal file
7
resources/views/layouts/datatables_js.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<!-- Datatables -->
|
||||
<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.2.2/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.2.2/js/buttons.bootstrap.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.2.2/js/buttons.colVis.min.js"></script>
|
||||
<script src="{{ asset('vendor/datatables/buttons.server-side.js') }}"></script>
|
||||
0
resources/views/layouts/menu.blade.php
Normal file
0
resources/views/layouts/menu.blade.php
Normal file
41
resources/views/layouts/sidebar.blade.php
Normal file
41
resources/views/layouts/sidebar.blade.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<aside class="main-sidebar" id="sidebar-wrapper">
|
||||
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="http://infyom.com/images/logo/blue_logo_150x150.jpg" class="img-circle"
|
||||
alt="User Image"/>
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
@if (Auth::guest())
|
||||
<p>InfyOm</p>
|
||||
@else
|
||||
<p>{{ Auth::user()->name}}</p>
|
||||
@endif
|
||||
<!-- Status -->
|
||||
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- search form (Optional) -->
|
||||
<form action="#" method="get" class="sidebar-form">
|
||||
<div class="input-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search..."/>
|
||||
<span class="input-group-btn">
|
||||
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<!-- Sidebar Menu -->
|
||||
|
||||
<ul class="sidebar-menu">
|
||||
@include('layouts.menu')
|
||||
</ul>
|
||||
<!-- /.sidebar-menu -->
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
91
resources/views/welcome.blade.php
Executable file
91
resources/views/welcome.blade.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>Laravel</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {
|
||||
background-color: #fff;
|
||||
color: #636b6f;
|
||||
font-family: 'Raleway';
|
||||
font-weight: 100;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.full-height {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.flex-center {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.position-ref {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.top-right {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 18px;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 84px;
|
||||
}
|
||||
|
||||
.links > a {
|
||||
color: #636b6f;
|
||||
padding: 0 25px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: .1rem;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.m-b-md {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-center position-ref full-height">
|
||||
@if (Route::has('login'))
|
||||
<div class="top-right links">
|
||||
<a href="{{ url('/login') }}">Login</a>
|
||||
<a href="{{ url('/register') }}">Register</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="content">
|
||||
<div class="title m-b-md">
|
||||
Laravel
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<a href="https://laravel.com/docs">Documentation</a>
|
||||
<a href="https://laracasts.com">Laracasts</a>
|
||||
<a href="https://laravel-news.com">News</a>
|
||||
<a href="https://forge.laravel.com">Forge</a>
|
||||
<a href="https://github.com/laravel/laravel">GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
18
routes/api.php
Executable file
18
routes/api.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
})->middleware('auth:api');
|
||||
18
routes/console.php
Executable file
18
routes/console.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of your Closure based console
|
||||
| commands. Each Closure is bound to a command instance allowing a
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
*/
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
});
|
||||
21
routes/web.php
Executable file
21
routes/web.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of the routes that are handled
|
||||
| by your application. Just tell Laravel the URIs it should respond
|
||||
| to using a Closure or controller method. Build something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
return redirect('home');
|
||||
});
|
||||
|
||||
|
||||
Auth::routes();
|
||||
|
||||
Route::get('/home', 'HomeController@index');
|
||||
21
server.php
Executable file
21
server.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Laravel - A PHP Framework For Web Artisans
|
||||
*
|
||||
* @package Laravel
|
||||
* @author Taylor Otwell <taylor@laravel.com>
|
||||
*/
|
||||
|
||||
$uri = urldecode(
|
||||
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
|
||||
);
|
||||
|
||||
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
|
||||
// built-in PHP web server. This provides a convenient way to test a Laravel
|
||||
// application without having installed a "real" web server software here.
|
||||
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
require_once __DIR__.'/public/index.php';
|
||||
3
storage/app/.gitignore
vendored
Executable file
3
storage/app/.gitignore
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!public/
|
||||
!.gitignore
|
||||
2
storage/app/public/.gitignore
vendored
Executable file
2
storage/app/public/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
8
storage/framework/.gitignore
vendored
Executable file
8
storage/framework/.gitignore
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
config.php
|
||||
routes.php
|
||||
schedule-*
|
||||
compiled.php
|
||||
services.json
|
||||
events.scanned.php
|
||||
routes.scanned.php
|
||||
down
|
||||
2
storage/framework/cache/.gitignore
vendored
Executable file
2
storage/framework/cache/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
storage/framework/sessions/.gitignore
vendored
Executable file
2
storage/framework/sessions/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
storage/framework/views/.gitignore
vendored
Executable file
2
storage/framework/views/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
storage/logs/.gitignore
vendored
Executable file
2
storage/logs/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
28
tests/ApiTestTrait.php
Normal file
28
tests/ApiTestTrait.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
trait ApiTestTrait
|
||||
{
|
||||
public function assertApiResponse(Array $actualData)
|
||||
{
|
||||
$this->assertApiSuccess();
|
||||
|
||||
$response = json_decode($this->response->getContent(), true);
|
||||
$responseData = $response['data'];
|
||||
|
||||
$this->assertNotEmpty($responseData['id']);
|
||||
$this->assertModelData($actualData, $responseData);
|
||||
}
|
||||
|
||||
public function assertApiSuccess()
|
||||
{
|
||||
$this->assertResponseOk();
|
||||
$this->seeJson(['success' => true]);
|
||||
}
|
||||
|
||||
public function assertModelData(Array $actualData, Array $expectedData)
|
||||
{
|
||||
foreach ($actualData as $key => $value) {
|
||||
$this->assertEquals($actualData[$key], $expectedData[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
tests/ExampleTest.php
Executable file
19
tests/ExampleTest.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic functional test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBasicExample()
|
||||
{
|
||||
$this->visit('/')
|
||||
->see('Laravel');
|
||||
}
|
||||
}
|
||||
25
tests/TestCase.php
Executable file
25
tests/TestCase.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
{
|
||||
/**
|
||||
* The base URL to use while testing the application.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $baseUrl = 'http://localhost';
|
||||
|
||||
/**
|
||||
* Creates the application.
|
||||
*
|
||||
* @return \Illuminate\Foundation\Application
|
||||
*/
|
||||
public function createApplication()
|
||||
{
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
|
||||
return $app;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user