Browse Source

added views

pull/11/head
KodeStar 7 years ago
parent
commit
0a0fccb309
  1. 7
      app/Providers/AppServiceProvider.php
  2. 2
      config/database.php
  3. 36
      resources/views/app.blade.php
  4. 36
      resources/views/welcome.blade.php

7
app/Providers/AppServiceProvider.php

@ -13,7 +13,12 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
// if(!file_exists(database_path(env('DB_DATABASE')))) {
// first time setup
//die("No Database");
touch(database_path(env('DB_DATABASE')));
\Artisan::call('migrate', array('--path' => 'app/migrations', '--force' => true));
}
} }
/** /**

2
config/database.php

@ -36,7 +36,7 @@ return [
'sqlite' => [ 'sqlite' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
//'database' => env('DB_DATABASE', database_path('database.sqlite')), //'database' => env('DB_DATABASE', database_path('database.sqlite')),
'database' => database_path(env('DB_DATABASE')) 'database' => database_path(env('DB_DATABASE')),
'prefix' => '', 'prefix' => '',
], ],

36
resources/views/app.blade.php

@ -0,0 +1,36 @@
<!doctype html>
<html lang="{{ app()->getLocale() }}">
<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>{{ config('app.name') }}</title>
<link rel="stylesheet" href="{{ mix('/css/app.css') }}" type="text/css" />
</head>
<body>
<div id="app">
<nav>
<ul>
<li><a href=""><i class="fa fa-dash"></i></a></li>
<li><a href=""><i class="fa fa-dash"></i></a></li>
<li><a href=""><i class="fa fa-dash"></i></a></li>
</ul>
</nav>
<div class="content">
<header>
test
</header>
<main>
@yield('content')
</main>
<footer>
test
</footer>
</div>
</div>
</body>
</html>

36
resources/views/welcome.blade.php

@ -1,38 +1,10 @@
<!doctype html> @extends('app')
<html lang="{{ app()->getLocale() }}">
<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>{{ config('app.name') }}</title> @section('content')
<link rel="stylesheet" href="{{ mix('/css/app.css') }}" type="text/css" />
</head>
<body>
<div id="app">
<nav>
<ul>
<li><a href=""><i class="fa fa-dash"></i></a></li>
<li><a href=""><i class="fa fa-dash"></i></a></li>
<li><a href=""><i class="fa fa-dash"></i></a></li>
</ul>
</nav>
<div class="content">
<header>
test
</header>
<main>
<section class="item"> <section class="item">
Item Item
</section> </section>
</main>
<footer>
test @endsection
</footer>
</div>
</div>
</body>
</html>
Loading…
Cancel
Save