Skip to content

Commit 05d50a1

Browse files
committed
add laravel 5
1 parent 53a974a commit 05d50a1

File tree

154 files changed

+19854
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+19854
-2
lines changed

.env.example

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
APP_ENV=local
2+
APP_DEBUG=true
3+
APP_KEY=SomeRandomString
4+
5+
DB_HOST=localhost
6+
DB_DATABASE=homestead
7+
DB_USERNAME=homestead
8+
DB_PASSWORD=secret
9+
10+
CACHE_DRIVER=file
11+
SESSION_DRIVER=file

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/vendor
2+
/node_modules
3+
.env

README.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
1-
# laravel-startkit
2-
Laravel 5 startup tool kits
1+
## Laravel PHP Framework
2+
3+
[![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework)
4+
[![Total Downloads](https://poser.pugx.org/laravel/framework/downloads.svg)](https://packagist.org/packages/laravel/framework)
5+
[![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework)
6+
[![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework)
7+
[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework)
8+
9+
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.
10+
11+
Laravel is accessible, yet powerful, providing powerful 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.
12+
13+
## Official Documentation
14+
15+
Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs).
16+
17+
## Contributing
18+
19+
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions).
20+
21+
### License
22+
23+
The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

app/Commands/Command.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php namespace App\Commands;
2+
3+
abstract class Command {
4+
5+
//
6+
7+
}

app/Console/Commands/Inspire.php

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php namespace App\Console\Commands;
2+
3+
use Illuminate\Console\Command;
4+
use Illuminate\Foundation\Inspiring;
5+
use Symfony\Component\Console\Input\InputOption;
6+
use Symfony\Component\Console\Input\InputArgument;
7+
8+
class Inspire extends Command {
9+
10+
/**
11+
* The console command name.
12+
*
13+
* @var string
14+
*/
15+
protected $name = 'inspire';
16+
17+
/**
18+
* The console command description.
19+
*
20+
* @var string
21+
*/
22+
protected $description = 'Display an inspiring quote';
23+
24+
/**
25+
* Execute the console command.
26+
*
27+
* @return mixed
28+
*/
29+
public function handle()
30+
{
31+
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
32+
}
33+
34+
}

app/Console/Kernel.php

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php namespace App\Console;
2+
3+
use Illuminate\Console\Scheduling\Schedule;
4+
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
5+
6+
class Kernel extends ConsoleKernel {
7+
8+
/**
9+
* The Artisan commands provided by your application.
10+
*
11+
* @var array
12+
*/
13+
protected $commands = [
14+
'App\Console\Commands\Inspire',
15+
];
16+
17+
/**
18+
* Define the application's command schedule.
19+
*
20+
* @param \Illuminate\Console\Scheduling\Schedule $schedule
21+
* @return void
22+
*/
23+
protected function schedule(Schedule $schedule)
24+
{
25+
$schedule->command('inspire')
26+
->hourly();
27+
}
28+
29+
}

app/Events/Event.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php namespace App\Events;
2+
3+
abstract class Event {
4+
5+
//
6+
7+
}

app/Exceptions/Handler.php

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php namespace App\Exceptions;
2+
3+
use Exception;
4+
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
5+
6+
class Handler extends ExceptionHandler {
7+
8+
/**
9+
* A list of the exception types that should not be reported.
10+
*
11+
* @var array
12+
*/
13+
protected $dontReport = [
14+
'Symfony\Component\HttpKernel\Exception\HttpException'
15+
];
16+
17+
/**
18+
* Report or log an exception.
19+
*
20+
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
21+
*
22+
* @param \Exception $e
23+
* @return void
24+
*/
25+
public function report(Exception $e)
26+
{
27+
return parent::report($e);
28+
}
29+
30+
/**
31+
* Render an exception into an HTTP response.
32+
*
33+
* @param \Illuminate\Http\Request $request
34+
* @param \Exception $e
35+
* @return \Illuminate\Http\Response
36+
*/
37+
public function render($request, Exception $e)
38+
{
39+
if ($this->isHttpException($e))
40+
{
41+
return $this->renderHttpException($e);
42+
}
43+
else
44+
{
45+
return parent::render($request, $e);
46+
}
47+
}
48+
49+
}

app/Handlers/Commands/.gitkeep

Whitespace-only changes.

app/Handlers/Events/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php namespace App\Http\Controllers\Auth;
2+
3+
use App\Http\Controllers\Controller;
4+
use Illuminate\Contracts\Auth\Guard;
5+
use Illuminate\Contracts\Auth\Registrar;
6+
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
7+
8+
class AuthController extends Controller {
9+
10+
/*
11+
|--------------------------------------------------------------------------
12+
| Registration & Login Controller
13+
|--------------------------------------------------------------------------
14+
|
15+
| This controller handles the registration of new users, as well as the
16+
| authentication of existing users. By default, this controller uses
17+
| a simple trait to add these behaviors. Why don't you explore it?
18+
|
19+
*/
20+
21+
use AuthenticatesAndRegistersUsers;
22+
23+
/**
24+
* Create a new authentication controller instance.
25+
*
26+
* @param \Illuminate\Contracts\Auth\Guard $auth
27+
* @param \Illuminate\Contracts\Auth\Registrar $registrar
28+
* @return void
29+
*/
30+
public function __construct(Guard $auth, Registrar $registrar)
31+
{
32+
$this->auth = $auth;
33+
$this->registrar = $registrar;
34+
35+
$this->middleware('guest', ['except' => 'getLogout']);
36+
}
37+
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php namespace App\Http\Controllers\Auth;
2+
3+
use App\Http\Controllers\Controller;
4+
use Illuminate\Contracts\Auth\Guard;
5+
use Illuminate\Contracts\Auth\PasswordBroker;
6+
use Illuminate\Foundation\Auth\ResetsPasswords;
7+
8+
class PasswordController extends Controller {
9+
10+
/*
11+
|--------------------------------------------------------------------------
12+
| Password Reset Controller
13+
|--------------------------------------------------------------------------
14+
|
15+
| This controller is responsible for handling password reset requests
16+
| and uses a simple trait to include this behavior. You're free to
17+
| explore this trait and override any methods you wish to tweak.
18+
|
19+
*/
20+
21+
use ResetsPasswords;
22+
23+
/**
24+
* Create a new password controller instance.
25+
*
26+
* @param \Illuminate\Contracts\Auth\Guard $auth
27+
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
28+
* @return void
29+
*/
30+
public function __construct(Guard $auth, PasswordBroker $passwords)
31+
{
32+
$this->auth = $auth;
33+
$this->passwords = $passwords;
34+
35+
$this->middleware('guest');
36+
}
37+
38+
}

app/Http/Controllers/Controller.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php namespace App\Http\Controllers;
2+
3+
use Illuminate\Foundation\Bus\DispatchesCommands;
4+
use Illuminate\Routing\Controller as BaseController;
5+
use Illuminate\Foundation\Validation\ValidatesRequests;
6+
7+
abstract class Controller extends BaseController {
8+
9+
use DispatchesCommands, ValidatesRequests;
10+
11+
}
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php namespace App\Http\Controllers;
2+
3+
class HomeController extends Controller {
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Home Controller
8+
|--------------------------------------------------------------------------
9+
|
10+
| This controller renders your application's "dashboard" for users that
11+
| are authenticated. Of course, you are free to change or remove the
12+
| controller as you wish. It is just here to get your app started!
13+
|
14+
*/
15+
16+
/**
17+
* Create a new controller instance.
18+
*
19+
* @return void
20+
*/
21+
public function __construct()
22+
{
23+
$this->middleware('auth');
24+
}
25+
26+
/**
27+
* Show the application dashboard to the user.
28+
*
29+
* @return Response
30+
*/
31+
public function index()
32+
{
33+
return view('home');
34+
}
35+
36+
}
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php namespace App\Http\Controllers;
2+
3+
class WelcomeController extends Controller {
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Welcome Controller
8+
|--------------------------------------------------------------------------
9+
|
10+
| This controller renders the "marketing page" for the application and
11+
| is configured to only allow guests. Like most of the other sample
12+
| controllers, you are free to modify or remove it as you desire.
13+
|
14+
*/
15+
16+
/**
17+
* Create a new controller instance.
18+
*
19+
* @return void
20+
*/
21+
public function __construct()
22+
{
23+
$this->middleware('guest');
24+
}
25+
26+
/**
27+
* Show the application welcome screen to the user.
28+
*
29+
* @return Response
30+
*/
31+
public function index()
32+
{
33+
return view('welcome');
34+
}
35+
36+
}

app/Http/Kernel.php

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php namespace App\Http;
2+
3+
use Illuminate\Foundation\Http\Kernel as HttpKernel;
4+
5+
class Kernel extends HttpKernel {
6+
7+
/**
8+
* The application's global HTTP middleware stack.
9+
*
10+
* @var array
11+
*/
12+
protected $middleware = [
13+
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode',
14+
'Illuminate\Cookie\Middleware\EncryptCookies',
15+
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
16+
'Illuminate\Session\Middleware\StartSession',
17+
'Illuminate\View\Middleware\ShareErrorsFromSession',
18+
'App\Http\Middleware\VerifyCsrfToken',
19+
];
20+
21+
/**
22+
* The application's route middleware.
23+
*
24+
* @var array
25+
*/
26+
protected $routeMiddleware = [
27+
'auth' => 'App\Http\Middleware\Authenticate',
28+
'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth',
29+
'guest' => 'App\Http\Middleware\RedirectIfAuthenticated',
30+
];
31+
32+
}

0 commit comments

Comments
 (0)