-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from danivideda/master
test
- Loading branch information
Showing
25 changed files
with
1,094 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
|
||
class TeacherController extends Controller | ||
{ | ||
public function index() { | ||
return view('teacher.dashboard'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Foundation\Auth\User as Authenticatable; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Teacher extends Authenticatable | ||
{ | ||
use HasFactory; | ||
|
||
protected $fillable = [ | ||
'name', | ||
'school_name', | ||
'email', | ||
'password' | ||
]; | ||
|
||
protected $hidden = [ | ||
'password', | ||
'remember_token', | ||
]; | ||
|
||
protected $casts = [ | ||
'classroom_teached' => 'array', | ||
'email_verified_at' => 'datetime', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
database/migrations/2020_11_26_234638_create_teachers_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateTeachersTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('teachers', function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('name'); | ||
$table->string('school_name'); | ||
$table->string('email')->unique(); | ||
$table->json('classroom_teached')->nullable(); | ||
$table->timestamp('email_verified_at')->nullable(); | ||
$table->string('password'); | ||
$table->rememberToken(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('teachers'); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@extends('layouts.app') | ||
|
||
@section('content') | ||
|
||
<section class="bg-gradient-to-r from-blue-300 to-green-400 pt-12 pb-16 md:pt-8 px-8 h-screen" id="login"> | ||
<div class="container mx-auto flex flex-wrap flex-col md:flex-row items-center px-10"> | ||
<div class="w-full xl:w-7/12 py-6 overflow-y-hidden"> | ||
<img class="w-5/6 lg:mr-0" src="http://www.pngall.com/wp-content/uploads/5/Learning-PNG-Free-Download.png"> | ||
</div> | ||
<div class="flex flex-col w-full xl:w-5/12 justify-center overflow-y-hidden"> | ||
<div class="bg-blue-500 px-4 py-8"> | ||
<span class="text-black font-extrabold text-center text-3xl inline mx-9"> LOGIN </span> | ||
<p class="text-black font-extrabold text-center text-3xl inline mx-9 "> | </p> | ||
<a class="text-gray-600 font-extrabold text-center text-3xl inline mx-9" href="{{ route('register.student') }}"> SIGN UP </a> | ||
</div> | ||
<div class="bg-white py-16 px-20"> | ||
<form action="" method="post"> | ||
@csrf | ||
<div class="mb-4"> | ||
<label for="email" class="sr-only">Email</label> | ||
<input type="text" name="email" id="email" placeholder="Email" | ||
class="bg-gray-100 border-2 w-full p-4 rounded-lg @error('email') border-red-500 @enderror" value="{{ old('email') }}"> | ||
|
||
@error('email') | ||
<div class="text-red-500 mt-2 text-sm"> | ||
{{ $message }} | ||
</div> | ||
@enderror | ||
</div> | ||
|
||
<div class="mb-4"> | ||
<label for="password" class="sr-only">Password</label> | ||
<input type="password" name="password" id="password" placeholder="Password" | ||
class="bg-gray-100 border-2 w-full p-4 rounded-lg @error('password') border-red-500 @enderror" value=""> | ||
|
||
@error('password') | ||
<div class="text-red-500 mt-2 text-sm"> | ||
{{ $message }} | ||
</div> | ||
@enderror | ||
</div> | ||
<div> | ||
<button type="submit" class="bg-pink-600 text-white px-4 py-3 rounded font-medium w-full">Login</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
@endsection |
Oops, something went wrong.