datatable.directory codebase
				https://datatable.directory/
			
			
		
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							26 lines
						
					
					
						
							436 B
						
					
					
				
			
		
		
	
	
							26 lines
						
					
					
						
							436 B
						
					
					
				<?php
 | 
						|
 | 
						|
namespace App\Policies;
 | 
						|
 | 
						|
use App\Models\Table;
 | 
						|
use App\Models\User;
 | 
						|
use Illuminate\Auth\Access\HandlesAuthorization;
 | 
						|
 | 
						|
class TablePolicy
 | 
						|
{
 | 
						|
    use HandlesAuthorization;
 | 
						|
 | 
						|
    public function __construct()
 | 
						|
    {
 | 
						|
    }
 | 
						|
 | 
						|
    public function edit(User $user, Table $table)
 | 
						|
    {
 | 
						|
        return $user->ownsTable($table);
 | 
						|
    }
 | 
						|
 | 
						|
    public function delete(User $user, Table $table)
 | 
						|
    {
 | 
						|
        return $user->ownsTable($table);
 | 
						|
    }
 | 
						|
}
 | 
						|
 |