Compare commits

..

4 Commits
master ... 5.2

Author SHA1 Message Date
Taylor Otwell 1f74747cd3 Merge pull request #3 from absemetov/patch-1
10 years ago
Nadir Absemetov 536eb3bb1c Old input name
10 years ago
Taylor Otwell 9ff73afab3 use model binding
10 years ago
Taylor Otwell e04f3ff8cc update to 5.2
10 years ago

@ -1,9 +1,8 @@
APP_ENV=local APP_ENV=local
APP_DEBUG=true APP_DEBUG=true
APP_KEY=b809vCwvtawRbsG0BmP1tWgnlXQypSKf APP_KEY=J6cc5Vpd1q5F76VGcCfMY3rx8dEeCOfE
APP_URL=http://localhost
DB_HOST=127.0.0.1 DB_HOST=localhost
DB_DATABASE=homestead DB_DATABASE=homestead
DB_USERNAME=homestead DB_USERNAME=homestead
DB_PASSWORD=secret DB_PASSWORD=secret
@ -12,10 +11,6 @@ CACHE_DRIVER=file
SESSION_DRIVER=file SESSION_DRIVER=file
QUEUE_DRIVER=sync QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io MAIL_HOST=mailtrap.io
MAIL_PORT=2525 MAIL_PORT=2525

@ -1,9 +1,8 @@
APP_ENV=local APP_ENV=local
APP_DEBUG=true APP_DEBUG=true
APP_KEY=SomeRandomString APP_KEY=SomeRandomString
APP_URL=http://localhost
DB_HOST=127.0.0.1 DB_HOST=localhost
DB_DATABASE=homestead DB_DATABASE=homestead
DB_USERNAME=homestead DB_USERNAME=homestead
DB_PASSWORD=secret DB_PASSWORD=secret
@ -12,10 +11,6 @@ CACHE_DRIVER=file
SESSION_DRIVER=file SESSION_DRIVER=file
QUEUE_DRIVER=sync QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io MAIL_HOST=mailtrap.io
MAIL_PORT=2525 MAIL_PORT=2525

2
.gitignore vendored

@ -1,6 +1,4 @@
/vendor /vendor
/node_modules /node_modules
/public/storage
Homestead.yaml Homestead.yaml
Homestead.json Homestead.json
.env

@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel
* @var array * @var array
*/ */
protected $commands = [ protected $commands = [
// Commands\Inspire::class, \App\Console\Commands\Inspire::class,
]; ];
/** /**
@ -24,7 +24,7 @@ class Kernel extends ConsoleKernel
*/ */
protected function schedule(Schedule $schedule) protected function schedule(Schedule $schedule)
{ {
// $schedule->command('inspire') $schedule->command('inspire')
// ->hourly(); ->hourly();
} }
} }

@ -3,10 +3,10 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception; use Exception;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Validation\ValidationException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
@ -33,7 +33,7 @@ class Handler extends ExceptionHandler
*/ */
public function report(Exception $e) public function report(Exception $e)
{ {
parent::report($e); return parent::report($e);
} }
/** /**

@ -23,13 +23,6 @@ class AuthController extends Controller
use AuthenticatesAndRegistersUsers, ThrottlesLogins; use AuthenticatesAndRegistersUsers, ThrottlesLogins;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/';
/** /**
* Create a new authentication controller instance. * Create a new authentication controller instance.
* *
@ -37,7 +30,7 @@ class AuthController extends Controller
*/ */
public function __construct() public function __construct()
{ {
$this->middleware('guest', ['except' => 'logout']); $this->middleware('guest', ['except' => 'getLogout']);
} }
/** /**

@ -7,7 +7,7 @@ use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController abstract class Controller extends BaseController
{ {
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
} }

@ -9,8 +9,6 @@ class Kernel extends HttpKernel
/** /**
* The application's global HTTP middleware stack. * The application's global HTTP middleware stack.
* *
* These middleware are run during every request to your application.
*
* @var array * @var array
*/ */
protected $middleware = [ protected $middleware = [
@ -39,8 +37,6 @@ class Kernel extends HttpKernel
/** /**
* The application's route middleware. * The application's route middleware.
* *
* These middleware may be assigned to groups or used individually.
*
* @var array * @var array
*/ */
protected $routeMiddleware = [ protected $routeMiddleware = [

@ -3,25 +3,42 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Closure; use Closure;
use Illuminate\Support\Facades\Auth; use Illuminate\Contracts\Auth\Guard;
class Authenticate class Authenticate
{ {
/**
* The Guard implementation.
*
* @var Guard
*/
protected $auth;
/**
* Create a new filter instance.
*
* @param Guard $auth
* @return void
*/
public function __construct(Guard $auth)
{
$this->auth = $auth;
}
/** /**
* Handle an incoming request. * Handle an incoming request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @param string|null $guard
* @return mixed * @return mixed
*/ */
public function handle($request, Closure $next, $guard = null) public function handle($request, Closure $next)
{ {
if (Auth::guard($guard)->guest()) { if ($this->auth->guest()) {
if ($request->ajax() || $request->wantsJson()) { if ($request->ajax()) {
return response('Unauthorized.', 401); return response('Unauthorized.', 401);
} else { } else {
return redirect()->guest('login'); return redirect()->guest('auth/login');
} }
} }

@ -3,22 +3,39 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Closure; use Closure;
use Illuminate\Support\Facades\Auth; use Illuminate\Contracts\Auth\Guard;
class RedirectIfAuthenticated class RedirectIfAuthenticated
{ {
/**
* The Guard implementation.
*
* @var Guard
*/
protected $auth;
/**
* Create a new filter instance.
*
* @param Guard $auth
* @return void
*/
public function __construct(Guard $auth)
{
$this->auth = $auth;
}
/** /**
* Handle an incoming request. * Handle an incoming request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @param string|null $guard
* @return mixed * @return mixed
*/ */
public function handle($request, Closure $next, $guard = null) public function handle($request, Closure $next)
{ {
if (Auth::guard($guard)->check()) { if ($this->auth->check()) {
return redirect('/'); return redirect('/home');
} }
return $next($request); return $next($request);

@ -5,16 +5,17 @@
| Application Routes | Application Routes
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This route group applies the "web" middleware group to every route | Here is where you can register all of the routes for an application.
| it contains. The "web" middleware group is defined in your HTTP | It's a breeze. Simply tell Laravel the URIs it should respond to
| kernel and includes session state, CSRF protection, and more. | and give it the controller to call when that URI is requested.
| |
*/ */
use App\Task; use App\Task;
use Illuminate\Http\Request; use Illuminate\Http\Request;
Route::group(['middleware' => ['web']], function () { Route::group(['middleware' => 'web'], function () {
/** /**
* Show Task Dashboard * Show Task Dashboard
*/ */
@ -24,6 +25,7 @@ Route::group(['middleware' => ['web']], function () {
]); ]);
}); });
/** /**
* Add New Task * Add New Task
*/ */
@ -45,12 +47,14 @@ Route::group(['middleware' => ['web']], function () {
return redirect('/'); return redirect('/');
}); });
/** /**
* Delete Task * Delete Task
*/ */
Route::delete('/task/{id}', function ($id) { Route::delete('/task/{task}', function (Task $task) {
Task::findOrFail($id)->delete(); $task->delete();
return redirect('/'); return redirect('/');
}); });
}); });

@ -24,7 +24,7 @@ class AuthServiceProvider extends ServiceProvider
*/ */
public function boot(GateContract $gate) public function boot(GateContract $gate)
{ {
$this->registerPolicies($gate); parent::registerPolicies($gate);
// //
} }

@ -2,25 +2,38 @@
namespace App; namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class User extends Authenticatable class User extends Model implements AuthenticatableContract,
AuthorizableContract,
CanResetPasswordContract
{ {
use Authenticatable, Authorizable, CanResetPassword;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
/** /**
* The attributes that are mass assignable. * The attributes that are mass assignable.
* *
* @var array * @var array
*/ */
protected $fillable = [ protected $fillable = ['name', 'email', 'password'];
'name', 'email', 'password',
];
/** /**
* The attributes excluded from the model's JSON form. * The attributes excluded from the model's JSON form.
* *
* @var array * @var array
*/ */
protected $hidden = [ protected $hidden = ['password', 'remember_token'];
'password', 'remember_token',
];
} }

@ -6,14 +6,15 @@
"type": "project", "type": "project",
"require": { "require": {
"php": ">=5.5.9", "php": ">=5.5.9",
"laravel/framework": "5.2.*" "laravel/framework": "5.2.*",
"symfony/dom-crawler": "^3.0",
"symfony/css-selector": "^3.0"
}, },
"require-dev": { "require-dev": {
"fzaninotto/faker": "~1.4", "fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*", "mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0", "phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*", "phpspec/phpspec": "~2.1"
"symfony/dom-crawler": "2.8.*|3.0.*"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [
@ -29,12 +30,6 @@
] ]
}, },
"scripts": { "scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [ "post-install-cmd": [
"php artisan clear-compiled", "php artisan clear-compiled",
"php artisan optimize" "php artisan optimize"
@ -44,8 +39,15 @@
], ],
"post-update-cmd": [ "post-update-cmd": [
"php artisan optimize" "php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
] ]
}, },
"minimum-stability": "dev",
"config": { "config": {
"preferred-install": "dist" "preferred-install": "dist"
} }

695
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -39,7 +39,7 @@ return [
| |
*/ */
'url' => env('APP_URL', 'http://localhost'), 'url' => 'http://localhost',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -91,7 +91,7 @@ return [
| |
*/ */
'key' => env('APP_KEY'), 'key' => env('APP_KEY', 'SomeRandomString'),
'cipher' => 'AES-256-CBC', 'cipher' => 'AES-256-CBC',
@ -108,7 +108,7 @@ return [
| |
*/ */
'log' => env('APP_LOG', 'single'), 'log' => 'single',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -126,6 +126,7 @@ return [
/* /*
* Laravel Framework Service Providers... * Laravel Framework Service Providers...
*/ */
Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
Illuminate\Auth\AuthServiceProvider::class, Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class, Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class, Illuminate\Bus\BusServiceProvider::class,
@ -185,6 +186,8 @@ return [
'File' => Illuminate\Support\Facades\File::class, 'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class, 'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class, 'Hash' => Illuminate\Support\Facades\Hash::class,
'Input' => Illuminate\Support\Facades\Input::class,
'Inspiring' => Illuminate\Foundation\Inspiring::class,
'Lang' => Illuminate\Support\Facades\Lang::class, 'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class, 'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class, 'Mail' => Illuminate\Support\Facades\Mail::class,

@ -87,7 +87,7 @@ return [
| |
| You may specify multiple password reset configurations if you have more | 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 | than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types. | seperate password reset settings based on the specific user types.
| |
| The expire time is the number of minutes that the reset token should be | The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so | considered valid. This security feature keeps tokens short-lived so

@ -33,9 +33,6 @@ return [
'key' => env('PUSHER_KEY'), 'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'), 'secret' => env('PUSHER_SECRET'),
'app_id' => env('PUSHER_APP_ID'), 'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
],
], ],
'redis' => [ 'redis' => [

@ -51,9 +51,7 @@ return [
'driver' => 'memcached', 'driver' => 'memcached',
'servers' => [ 'servers' => [
[ [
'host' => env('MEMCACHED_HOST', '127.0.0.1'), 'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100,
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
], ],
], ],
], ],

@ -48,7 +48,7 @@ return [
'sqlite' => [ 'sqlite' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'database' => database_path('database.sqlite'), 'database' => storage_path('database.sqlite'),
'prefix' => '', 'prefix' => '',
], ],
@ -62,7 +62,6 @@ return [
'collation' => 'utf8_unicode_ci', 'collation' => 'utf8_unicode_ci',
'prefix' => '', 'prefix' => '',
'strict' => false, 'strict' => false,
'engine' => null,
], ],
'pgsql' => [ 'pgsql' => [
@ -117,9 +116,8 @@ return [
'cluster' => false, 'cluster' => false,
'default' => [ 'default' => [
'host' => env('REDIS_HOST', 'localhost'), 'host' => '127.0.0.1',
'password' => env('REDIS_PASSWORD', null), 'port' => 6379,
'port' => env('REDIS_PORT', 6379),
'database' => 0, 'database' => 0,
], ],

@ -48,10 +48,18 @@ return [
'root' => storage_path('app'), 'root' => storage_path('app'),
], ],
'public' => [ 'ftp' => [
'driver' => 'local', 'driver' => 'ftp',
'root' => storage_path('app/public'), 'host' => 'ftp.example.com',
'visibility' => 'public', 'username' => 'your-username',
'password' => 'your-password',
// Optional FTP Settings...
// 'port' => 21,
// 'root' => '',
// 'passive' => true,
// 'ssl' => true,
// 'timeout' => 30,
], ],
's3' => [ 's3' => [
@ -62,6 +70,16 @@ return [
'bucket' => 'your-bucket', 'bucket' => 'your-bucket',
], ],
'rackspace' => [
'driver' => 'rackspace',
'username' => 'your-username',
'key' => 'your-key',
'container' => 'your-container',
'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
'region' => 'IAD',
'url_type' => 'publicURL',
],
], ],
]; ];

@ -108,4 +108,17 @@ return [
'sendmail' => '/usr/sbin/sendmail -bs', 'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Mail "Pretend"
|--------------------------------------------------------------------------
|
| When this option is enabled, e-mail will not actually be sent over the
| web and will instead be written to your application's logs files so
| you may inspect the message. This is great for local development.
|
*/
'pretend' => false,
]; ];

@ -12,7 +12,7 @@ return [
| syntax for each one. Here you may set the default queue driver. | syntax for each one. Here you may set the default queue driver.
| |
| Supported: "null", "sync", "database", "beanstalkd", | Supported: "null", "sync", "database", "beanstalkd",
| "sqs", "redis" | "sqs", "iron", "redis"
| |
*/ */
@ -53,11 +53,19 @@ return [
'driver' => 'sqs', 'driver' => 'sqs',
'key' => 'your-public-key', 'key' => 'your-public-key',
'secret' => 'your-secret-key', 'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 'queue' => 'your-queue-url',
'queue' => 'your-queue-name',
'region' => 'us-east-1', 'region' => 'us-east-1',
], ],
'iron' => [
'driver' => 'iron',
'host' => 'mq-aws-us-east-1.iron.io',
'token' => 'your-token',
'project' => 'your-project-id',
'queue' => 'your-queue-name',
'encrypt' => true,
],
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'default',
@ -79,8 +87,7 @@ return [
*/ */
'failed' => [ 'failed' => [
'database' => env('DB_CONNECTION', 'mysql'), 'database' => 'mysql', 'table' => 'failed_jobs',
'table' => 'failed_jobs',
], ],
]; ];

@ -1,6 +1,7 @@
<?php <?php
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
{ {
@ -11,6 +12,10 @@ class DatabaseSeeder extends Seeder
*/ */
public function run() public function run()
{ {
// $this->call(UsersTableSeeder::class); Model::unguard();
// $this->call(UserTableSeeder::class);
Model::reguard();
} }
} }

@ -4,7 +4,7 @@
"gulp": "^3.8.8" "gulp": "^3.8.8"
}, },
"dependencies": { "dependencies": {
"laravel-elixir": "^4.0.0", "laravel-elixir": "^3.0.0",
"bootstrap-sass": "^3.0.0" "bootstrap-sass": "^3.0.0"
} }
} }

@ -0,0 +1,5 @@
suites:
main:
namespace: App
psr4_prefix: App
src_path: app

@ -7,7 +7,8 @@
convertNoticesToExceptions="true" convertNoticesToExceptions="true"
convertWarningsToExceptions="true" convertWarningsToExceptions="true"
processIsolation="false" processIsolation="false"
stopOnFailure="false"> stopOnFailure="false"
syntaxCheck="false">
<testsuites> <testsuites>
<testsuite name="Application Test Suite"> <testsuite name="Application Test Suite">
<directory>./tests/</directory> <directory>./tests/</directory>

@ -13,8 +13,4 @@
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L] RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule> </IfModule>

@ -1,23 +0,0 @@
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)/$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

@ -1,15 +1,3 @@
# Laravel Quickstart - Basic # Laravel Quickstart - Basic
## Quck Installation http://laravel.com/docs/quickstart
git clone https://github.com/laravel/quickstart-basic quickstart
cd quickstart
composer install
php artisan migrate
php artisan serve
[Complete Tutorial](https://laravel.com/docs/5.2/quickstart)

@ -4,7 +4,7 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Password Reset Language Lines | Password Reminder Language Lines
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| The following language lines are the default lines which match reasons | The following language lines are the default lines which match reasons

@ -60,7 +60,6 @@ return [
'regex' => 'The :attribute format is invalid.', 'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.', 'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.', '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' => 'The :attribute field is required when :values is present.',
'required_with_all' => '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' => 'The :attribute field is required when :values is not present.',

@ -7,43 +7,59 @@
<title>Laravel Quickstart - Basic</title> <title>Laravel Quickstart - Basic</title>
<!-- Fonts --> <link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,700" rel="stylesheet" type="text/css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" rel='stylesheet' type='text/css'> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700" rel='stylesheet' type='text/css'> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!-- Styles --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
{{-- <link href="{{ elixir('css/app.css') }}" rel="stylesheet"> --}}
<style> <style>
body { body {
font-family: 'Lato'; font-family: 'Raleway';
margin-top: 25px;
} }
.fa-btn { button .fa {
margin-right: 6px; margin-right: 6px;
} }
.table-text div {
padding-top: 6px;
}
</style> </style>
<script>
$(function () {
$('#task-name').focus();
});
</script>
</head> </head>
<body id="app-layout">
<nav class="navbar navbar-default"> <body>
<div class="container"> <div class="container">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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="#">Task List</a>
<a class="navbar-brand" href="{{ url('/') }}">
Task List
</a>
</div> </div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
&nbsp;
</ul>
</div>
</div> </div>
</nav> </nav>
</div>
@yield('content') @yield('content')
<!-- JavaScripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
{{-- <script src="{{ elixir('js/app.js') }}"></script> --}}
</body> </body>
</html> </html>

@ -13,7 +13,7 @@
@include('common.errors') @include('common.errors')
<!-- New Task Form --> <!-- New Task Form -->
<form action="{{ url('task')}}" method="POST" class="form-horizontal"> <form action="/task" method="POST" class="form-horizontal">
{{ csrf_field() }} {{ csrf_field() }}
<!-- Task Name --> <!-- Task Name -->
@ -21,7 +21,7 @@
<label for="task-name" class="col-sm-3 control-label">Task</label> <label for="task-name" class="col-sm-3 control-label">Task</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" name="name" id="task-name" class="form-control" value="{{ old('task') }}"> <input type="text" name="name" id="task-name" class="form-control" value="{{ old('name') }}">
</div> </div>
</div> </div>
@ -29,7 +29,7 @@
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-3 col-sm-6"> <div class="col-sm-offset-3 col-sm-6">
<button type="submit" class="btn btn-default"> <button type="submit" class="btn btn-default">
<i class="fa fa-btn fa-plus"></i>Add Task <i class="fa fa-plus"></i>Add Task
</button> </button>
</div> </div>
</div> </div>
@ -57,12 +57,12 @@
<!-- Task Delete Button --> <!-- Task Delete Button -->
<td> <td>
<form action="{{ url('task/'.$task->id) }}" method="POST"> <form action="/task/{{ $task->id }}" method="POST">
{{ csrf_field() }} {{ csrf_field() }}
{{ method_field('DELETE') }} {{ method_field('DELETE') }}
<button type="submit" class="btn btn-danger"> <button type="submit" class="btn btn-danger">
<i class="fa fa-btn fa-trash"></i>Delete <i class="fa fa-trash"></i>Delete
</button> </button>
</form> </form>
</td> </td>

@ -1,45 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Laravel</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%;
display: table;
font-weight: 100;
font-family: 'Lato';
}
.container {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
}
.title {
font-size: 96px;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="title">Laravel 5</div>
</div>
</div>
</body>
</html>

@ -1,3 +1,2 @@
* *
!public/
!.gitignore !.gitignore

@ -1,2 +0,0 @@
*
!.gitignore
Loading…
Cancel
Save