Last active
March 6, 2017 10:06
-
-
Save segun6060/912e94fa5b23cbb4a733aff985b5af23 to your computer and use it in GitHub Desktop.
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
@extends('layouts.app') | |
@section('content') | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-8 col-md-offset-2"> | |
<div class="panel panel-default"> | |
<div class="panel-heading">Dashboard</div> | |
<div class="panel-body"> | |
You are logged in! | |
{{ Auth::user()->name }} | |
</div> | |
<div class="panel-body"> | |
You are your package is ₦ | |
{{ Auth::user()->plan }} | |
</div> | |
<div class="list-group"> | |
<a href="#" class="list-group-item disabled"> | |
You're yet to be paired | |
</a> | |
<a href="#" class="list-group-item"></a> | |
</div> | |
<div class="ui-kit-grids"> | |
<div class="col-md-9 ui-kit-grid-right"> | |
<div class="men-icon2"> | |
<p>You've been Paired to Pay</p> | |
<div class="clearfix"> </div> | |
<ul class="menu_1_left_nav1" style="display: block;"> | |
<li><a href="#">Amount : ₦{{ Auth::user()->message->amount }}</a></li> | |
<li><a href="#">Name : {{ Auth::user()->message->name }}</a></li> | |
<li><a href="#">Account Number : {{ Auth::user()->message->acnumber }}</a></li> | |
<li><a href="#">Account Name : {{ Auth::user()->message->acname }}</a></li> | |
<li><a href="#">Bank Name: {{ Auth::user()->message->bname }}</a></li> | |
<li><a href="#">Account Type : {{ Auth::user()->message->actype }}</a></li> | |
<li><a href="#">Phone Number : {{ Auth::user()->message->phone }}</a></li> | |
<li> | |
<a href="#"> | |
<form> | |
<div class="form-group"> | |
<h4 class="help-block">Uplaod proof of payment after paying.</h4> | |
<label for="exampleInputFile">File input</label> | |
<input type="file" name="proof" id="exampleInputFile"> | |
</div> | |
<button type="submit" class="btn btn-default">Submit</button> | |
</form> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
<div class="clearfix"> </div> | |
</div> | |
<div class="ui-kit-grids"> | |
<div class="col-md-9 ui-kit-grid-right"> | |
<div class="men-icon2"> | |
<p>You've been Paired to collect</p> | |
<div class="clearfix"> </div> | |
<ul class="menu_1_left_nav1" style="display: block;"> | |
<li><a href="#">Amount : ₦20,000</a></li> | |
<li><a href="#">From : wale</a></li> | |
<li><a href="#">Phone Number : 2435465564</a></li> | |
<li> | |
<a class="btn btn-success confirmed" href="{{ route('logout') }}" | |
onclick="event.preventDefault(); | |
document.getElementById('logout-form').submit();"> | |
Confirm | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
<div class="clearfix"> </div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
@endsection |
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
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use App\User; | |
use App\Message; | |
class HomeController extends Controller | |
{ | |
/** | |
* Create a new controller instance. | |
* | |
* @return void | |
*/ | |
public function __construct() | |
{ | |
$this->middleware('auth'); | |
} | |
/** | |
* Show the application dashboard. | |
* | |
* @return \Illuminate\Http\Response | |
*/ | |
public function index() | |
{ | |
$user = User::has('message')->get(); | |
return view('home', $user)->with('user', $user); | |
} | |
} |
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
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Message extends Model | |
{ | |
protected $fillable = [ | |
'userid', 'name', 'amount','acname','bname','acnumber','actype','phone', | |
]; | |
protected $table = 'messages'; | |
public function user() | |
{ | |
return $this->belongsTo('App\User','id'); | |
} | |
} | |
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
<?php | |
namespace App; | |
use Illuminate\Notifications\Notifiable; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
class User extends Authenticatable | |
{ | |
use Notifiable; | |
/** | |
* The attributes that are mass assignable. | |
* | |
* @var array | |
*/ | |
protected $fillable = [ | |
'name', 'email', 'password','phone','plan','bname','acname','acnumber','actype', | |
]; | |
protected $table = 'users'; | |
/** | |
* The attributes that should be hidden for arrays. | |
* | |
* @var array | |
*/ | |
protected $hidden = [ | |
'password', 'remember_token', | |
]; | |
public function message() | |
{ | |
return $this->hasOne('App\Message','user_id'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment