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\Controller; | |
use Knp\Component\Pager\PaginatorInterface; | |
use function Symfony\Component\String\u; | |
// ... | |
class HomeController extends AbstractController | |
{ |
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
import requests | |
# OAuth app information | |
oauth_info = { | |
"authorize_url": "https://clerk.your-domain.com/oauth/authorize", | |
"callback_url": "https://oauth-client.com/oauth2/callback", | |
"client_id": "d9g4CT4WYiCBm7EU", | |
"client_secret": "VVgbT7i6sPo7sTljq2zj12fjmg0jPL5k", | |
"scopes": "profile email", | |
"token_fetch_url": "https://clerk.your-domain.com/oauth/token", |
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
import requests | |
import asyncio | |
import websockets | |
import json | |
# OAuth app information | |
oauth_info = { | |
"authorize_url": "https://clerk.your-domain.com/oauth/authorize", | |
"callback_url": "https://oauth-client.com/oauth2/callback", | |
"client_id": "d9g4CT4WYiCBm7EU", |
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\Models\Enums; | |
class Badge | |
{ | |
use HasEnums; | |
const GEEK = 'geek'; | |
const TWITCHER = 'twitcher'; |
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\Middleware; | |
use Closure; | |
use Illuminate\Support\Facades\{App, Auth, Config, Cookie, Request, Session}; | |
class SetUserLanguage | |
{ | |
/** | |
* Handle an incoming request. | |
* | |
* @param \Illuminate\Http\Request $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\Requests; | |
use Illuminate\Foundation\Http\FormRequest; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Support\Facades\Hash; | |
use Illuminate\Validation\Rule; | |
class EditAccountRequest extends FormRequest |
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
class BankAccount(): | |
def __init__(self, first_name, last_name, balance=0): | |
self.__first_name = first_name | |
self.__last_name = last_name | |
self.__balance = balance | |
def withdraw(self, amount): | |
if(self.balance < amount): | |
return False |
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 | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateUsersTable extends Migration | |
{ | |
/** | |
* Run the migrations. |
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
<!-- Login View --> | |
<form action="/login" method="POST"> | |
{{ csrf_field() }} | |
<input type="email" name="email" placeholder="email"><br> | |
<input type="password" name="password" placeholder="password"><br> | |
<input type="submit"> | |
</form> | |
<!-- End Login View --> | |
<!-- Register View --> |
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 | |
use App\User; | |
use Illuminate\Http\Request; | |
/* | |
|-------------------------------------------------------------------------- | |
| Web Routes | |
|-------------------------------------------------------------------------- | |
| |
NewerOlder