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 Attendant extends Model { | |
// | |
// DEFINE RELATIONSHIPS -------------------------------------------------- | |
// each attendant HAS one day | |
protected $table = 'attendants'; |
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 App\Http\Requests; | |
use App\Http\Controllers\Controller; | |
use App\Attendant; | |
use App\Days; | |
use Session; | |
use Illuminate\Http\Request; |
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; | |
class UserController extends Controller | |
{ | |
public function home() |
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 | |
{ |
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
public function store(Request $request) | |
{ | |
$image = new Image; | |
$image->user_id = Auth::user()->id; | |
if($request->hasFile('imageproof')) { | |
$proof = $request->file('imageproof'); | |
$filename = time().'.'.$proof->getClientOriginalExtension(); |
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 | |
{ | |
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
public function caller(Request $request) | |
{ | |
$this->validate($request,[ | |
'avatar' => 'required|image|max:10240', | |
'reciever_id' => 'required', | |
]); | |
$image = new Imagene; |
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
public function confirma(Request $request) | |
{ | |
// | |
$this->validate($request, array( | |
'name' => 'required|max:255', | |
'amount' => 'required', | |
)); | |
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
public function confirma(Request $request) | |
{ | |
// | |
$this->validate($request, array( | |
'name' => 'required|max:255', | |
'amount' => 'required', | |
)); | |
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
public function friends() | |
{ | |
return $this->belongsToMany('App\User', 'friend_users', 'user_id', 'friend_id'); | |
} |
OlderNewer