mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-11-04 06:23:17 -05:00 
			
		
		
		
	* Create PHP CS Fixer config and add to CI workflow * Run php cs fixer on project * Add newline at end of file * Update to use PHP CS Fixer v3 * Run v3 config on project * Run seperate config in CI
		
			
				
	
	
		
			22 lines
		
	
	
		
			467 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			467 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace Crater\Http\Middleware;
 | 
						|
 | 
						|
use Illuminate\Auth\Middleware\Authenticate as Middleware;
 | 
						|
 | 
						|
class Authenticate extends Middleware
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * Get the path the user should be redirected to when they are not authenticated.
 | 
						|
     *
 | 
						|
     * @param  \Illuminate\Http\Request  $request
 | 
						|
     * @return string
 | 
						|
     */
 | 
						|
    protected function redirectTo($request)
 | 
						|
    {
 | 
						|
        if (! $request->expectsJson()) {
 | 
						|
            return route('login');
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |