laravel - How to send application to admin user who approves or disapproves the application sent -


the user fills data in form , sends admin... transport management system... user applies transport , sends admin... here user model.

<?php    namespace martin\models;  use illuminate\notifications\notifiable;  use illuminate\foundation\auth\user authenticatable;    class user extends authenticatable  {      use notifiable;        /**       * attributes mass assignable.       *       * @var array       */        protected $table='users';        protected $fillable = [  	   'id',          'group_name',          'patron_name',          'patron_number',           'group_chair',           'office_phone',           'email',          'password',      ];        /**       * attributes should hidden arrays.       *       * @var array       */      protected $hidden = [          'password',          'remember_token',      ];      	public function getusername(){  		return $this->group_name;  	}      }

and admin model follows

<?php    namespace martin\models;    use illuminate\notifications\notifiable;  use illuminate\foundation\auth\user authenticatable;      class admin extends authenticatable  {      //  	use notifiable;    	protected $guard="admin";    	protected $table="admins";    	protected $fillable=[  		'id',  	        'first_name',  	        'second_name',  	        'position',  	        'email',  	        'password'  	];    	protected $hidden=[  	       'password'  	];      	public function getadminname(){                return $this->first_name;  	}    	public function getadminposition(){  		return $this->position;  	}    	public function is_systemadmin(){    		if($this->system_admin){    			return true;    		}else {    			return false;  		}  	}  }

the model checks verify whether system admin or normal admin... admin approves , disapproves application sent user


Comments