Skip to content

Commit 097158b

Browse files
committed
updates
1 parent fb22286 commit 097158b

26 files changed

+319
-122
lines changed

app/Http/Controllers/AdminController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use App\Vaccancy;
1010
use App\User;
1111
use App\Role;
12+
use App\Booking;
1213
use Carbon\Carbon;
1314
use Illuminate\Http\Request;
1415
use App\Http\Requests;
@@ -22,10 +23,10 @@ class AdminController extends Controller
2223
function index()
2324
{
2425
$vaccancy = Vaccancy::get()->count();
25-
$room = Room::get()->count();
26+
$room = Booking::get()->count();
2627
$seat = Vaccancy::all()->sum('seats');
2728
$student = Student::get()->count();
28-
return view('front.admin.index', ['vaccancy' => $vaccancy, 'room' => $room, 'seat' => $seat, 'student' => $student]);
29+
return view('front.admin.index', ['vaccancy' => $vaccancy, 'booking' => $room, 'seat' => $seat, 'student' => $student]);
2930
}
3031

3132
function register_std(){

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ protected function create(array $data)
6868
'email' => $data['email'],
6969
'password' => bcrypt($data['password']),
7070
]);
71-
$user->roles()->attach(Role::where('name', 'Admin')->first());
71+
72+
$user->roles()->attach(Role::where('name', 'Admin')->first());
7273
Auth::user();
7374
}
7475
}

app/Http/Controllers/SiteController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App\Http\Controllers;
44

55
use App\Account;
6+
use App\User;
67
use App\Student;
78
use Carbon\Carbon;
89
use Faker\Provider\DateTime;
@@ -25,6 +26,7 @@ function index(){
2526

2627
return view('front.user.index',['vaccancies' => $vaccancies , 'homes' => $homes ]);
2728
}
29+
2830
function account(){
2931
$id = Auth::user()->user_id;
3032
$acc = Student::where('user_id', $id)->first();

app/Http/Controllers/VaccancyController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function post( Requests\CreateVaccancy $request){
2727
$type = $request['type'];
2828
$vaccancy = Vaccancy::where('type', $type)->first();
2929

30-
if(count($vaccancy) > 0)
30+
if(isset($vaccancy))
3131
{
3232
$old = $vaccancy->seats;
3333
$seats = $request['seats'];

database/migrations/2017_04_29_104003_create_accounts_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function up()
1818
$table->integer('std_id')->unsigned();
1919
$table->integer('room_id')->unsigned();
2020
$table->timestamp('deadline');
21-
$table->timestamps()->default('current_timestamp');
21+
$table->timestamps();
2222
$table->foreign('std_id')->references('std_id')->on('students');
2323
$table->foreign('room_id')->references('room_id')->on('rooms');
2424
});

database/seeds/RoleTableSeeder.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class RoleTableSeeder extends Seeder
1212
*/
1313
public function run()
1414
{
15-
$role_user = new Role;
15+
$role_user = new Role;
1616
$role_user->name ='Admin';
1717
$role_user->slug = 'Admin';
1818
$role_user->save();
@@ -22,6 +22,9 @@ public function run()
2222
$role_admin->slug = 'User';
2323
$role_admin->save();
2424

25-
25+
$role_admin = new Role;
26+
$role_admin->name ='Super';
27+
$role_admin->slug = 'Super';
28+
$role_admin->save();
2629
}
2730
}

public/assets/css/custom.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*custom css */
2-
2+
@import url('https://fonts.googleapis.com/css?family=Gloria+Hallelujah|Roboto');
33
.overlay{
44
background: -webkit-linear-gradient(top, rgba(72,76,97,0) 0%, rgba(72,76,97,0.8) 75%);
55
background: linear-gradient(to bottom, rgba(72,76,97,0) 0%, rgba(72,76,97,0.8) 75%);
@@ -117,6 +117,16 @@ textarea:hover::focus:-ms-placeholder {
117117
background-color: #666 !important;
118118
height: 100%;
119119
}
120+
121+
.nav-lg {
122+
padding: 10px;
123+
background: rgb(22, 30, 48);
124+
}
120125
.content {
121126
margin-top:4% !important;
127+
}
128+
129+
a.navbar-brand {
130+
font-family: 'Gloria Hallelujah', cursive;
131+
font-size: 24px;
122132
}

public/assets/images/1515032039.png

42.2 KB
Loading

public/assets/images/1515034426.png

42.2 KB
Loading

public/assets/images/1515035532.png

42.2 KB
Loading

0 commit comments

Comments
 (0)