/** * Run the database seeds. * * @return void */ public function run() { foreach (App\Company::all() as $company) { $company->touch(); $company->created_at = $company->updated_at; $company->save(); } }
<!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"> <?php //get company details $company = App\Company::all()->first(); ?> <title>@if(isset($company->company_name)) {{ $company->company_name }} @else Company @endif | {{$title}}</title> <link href="{{ asset('/css/normalize.css') }}" rel="stylesheet"> <link href="{{ asset('/css/bootstrap.css') }}" rel="stylesheet"> <link href="{{ asset('/css/dashboard.css') }}" rel="stylesheet"> <link href="{{ asset('/css/font-awesome.min.css') }}" rel="stylesheet"> <script src="{{ asset('/js/jquery.js') }}" rel="stylesheet"></script> <script src="{{ asset('/js/bootstrap.min.js') }}" rel="stylesheet"></script> <script src="{{ asset('/js/masonry.pkgd.min.js') }}" rel="stylesheet"></script> <script src="{{ asset('/js/dash.js') }}" rel="stylesheet"></script> <!-- HTML5 shim and Respond.js for 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.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]-->
| Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */ Route::get('/', 'WelcomeController@index'); Route::get('dashboard', 'PagesController@dashboard'); Route::get('login', 'PagesController@login'); Route::get('home', function () { if (Auth::guest()) { return Redirect::to('login'); } else { return view('pages.dashboard')->with('users', App\User::all())->with('task_categories', App\TaskCategory::all())->with('tasks', App\Task::all())->with('companies', App\Company::all())->with('contracts', App\Contract::all())->with('solutions', App\Solution::all())->with('clients', App\Client::all())->with('employees', App\Employee::all()); } }); // model routes.. Route::post('tc/store', 'TaskCategoryController@store'); Route::post('tc/edit/{id}', array('uses' => 'TaskCategoryController@edit', 'as' => 'route.edit')); Route::patch('tc/{id}', array('uses' => 'TaskCategoryController@update', 'as' => 'route.update')); Route::delete('tc/{id}', array('uses' => 'TaskCategoryController@destroy', 'as' => 'route.destroy')); Route::post('task/store', 'TaskController@store'); Route::post('task/edit/{id}', array('uses' => 'TaskController@edit', 'as' => 'task.edit')); Route::post('task/approve/{id}', array('uses' => 'TaskController@approve', 'as' => 'task.approve')); Route::patch('task/{id}', array('uses' => 'TaskController@update', 'as' => 'task.update')); Route::delete('task/{id}', array('uses' => 'TaskController@destroy', 'as' => 'task.destroy')); Route::post('client/store', 'ClientController@store'); Route::post('client/edit/{id}', array('uses' => 'ClientController@edit', 'as' => 'client.edit')); Route::patch('client/{id}', array('uses' => 'ClientController@update', 'as' => 'client.update'));