This file contains hidden or 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\Console; | |
| use App\Customer; | |
| use Illuminate\Contracts\Bus\Dispatcher; | |
| use InvalidArgumentException; | |
| use Illuminate\Console\Command; | |
| abstract class UpgradeCommand extends Command |
This file contains hidden or 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\Jobs; | |
| use Illuminate\Support\Facades\DB; | |
| use Throwable; | |
| use App\Customer; | |
| abstract class UpgradeJob | |
| { |
This file contains hidden or 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 | |
| protected function authenticated(Request $request, $user) | |
| { | |
| if (is_null($user->google_token)) { | |
| return redirect()->intended($this->redirectTo); | |
| } | |
| Auth::logout(); | |
| $request->session()->put('user-id', $user->id); |
This file contains hidden or 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\Auth; | |
| use App\Http\Controllers\Controller; | |
| use App\Models\Main\Admin; | |
| use Facades\PragmaRX\Google2FA\Google2FA; | |
| use Illuminate\Http\Request; | |
| class TokenController extends Controller |
This file contains hidden or 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\Profile; | |
| use App\Http\Controllers\Controller; | |
| use Illuminate\Http\Request; | |
| use Facades\PragmaRX\Google2FA\Google2FA; | |
| class GoogleTokenController extends Controller | |
| { |
This file contains hidden or 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 | |
| /** | |
| * @param Request $request | |
| * @return \Illuminate\Http\RedirectResponse | |
| */ | |
| public function update(Request $request) | |
| { | |
| if (is_null($request->get('token'))) { | |
| return $this->disableToken(); |
This file contains hidden or 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 Tests; | |
| use Illuminate\Contracts\Console\Kernel; | |
| use RuntimeException; | |
| trait CreatesApplication | |
| { | |
| protected $allowedHosts = ['', '127.0.0.1', 'localhost']; |
This file contains hidden or 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 | |
| /** | |
| * Creates the application. | |
| * | |
| * @return \Illuminate\Foundation\Application | |
| */ | |
| public function createApplication() | |
| { | |
| $app = require __DIR__.'/../bootstrap/app.php'; |