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 CustomCredentialProvider: CredentialsAuthProvider,IAuthResponseFilter | |
{ | |
public CustomCredentialProvider(IAppSettings appSettings):base(appSettings) | |
{ | |
} | |
public async Task ExecuteAsync(AuthFilterContext authContext) | |
{ | |
var db = HostContext.AppHost.GetDbConnection(authContext.Request); | |
var userId = Convert.ToInt32(authContext.Session.UserAuthId); |
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
/* FLEETING NOTES */ | |
span.page-reference[data-ref="fleeting note"] | |
{ background: var(--ls-primary-background-color); | |
background-size: 100%; | |
color: var(--ls-primary-text-color); | |
padding: 2px 5px 2px 5px; | |
font-size: 13px; | |
line-height: 1em; | |
font-weight: 500; |
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 url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&family=Fira+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap"); | |
:root { | |
--background: #282828; | |
--light-background: #3c3836; | |
--lighter-background: #504945; | |
--dark-background: #3c3836; | |
--darker-background: #1d2021; | |
--foreground: #ebdbb2; | |
--current-line: #504954; |
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
Route::middleware(['auth:sanctum', 'verified'])->group(function (){ | |
Route::get('/dashboard', function () { | |
return view('dashboard'); | |
})->name('dashboard'); | |
Route::get('/users', \App\Http\Livewire\UsersListComponent::class)->name('users'); | |
}); |
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
<livewire:datatable searchable="name,email" model="App\\Models\\User" include="id, name, email, created_at" dates="created_at" /> |
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
<div> | |
<x-slot name="header"> | |
<div class="md:flex md:items-center md:justify-between md:space-x-5"> | |
<div class="flex items-start space-x-5"> | |
<div class="flex-shrink-0"> | |
<div class="relative"> | |
<h2 class="font-semibold text-xl text-gray-800 leading-tight"> | |
{{ __('Users') }} | |
</h2> | |
</div> |
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
public function run() | |
{ | |
if (App::environment('local')) { | |
if(User::where('name', '=', 'Admin')->count() === 0) { | |
\\App\\Models\\User::insert([ | |
[ | |
'name' => 'Admin', | |
'email' => 'admin@localhost', | |
'email_verified_at' => now(), | |
'password' => Hash::make("admin@pwd23"), // password |
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 Database\\Seeders; | |
use Illuminate\\Database\\Seeder; | |
use Illuminate\\Support\\Facades\\App; | |
use Illuminate\\Support\\Facades\\Hash; | |
use Illuminate\\Support\\Str; | |
class UserSeeder extends Seeder |
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 Database\\Factories; | |
use App\\Models\\Team; | |
use App\\Models\\User; | |
use Illuminate\\Database\\Eloquent\\Factories\\Factory; | |
use Illuminate\\Support\\Str; | |
use Laravel\\Jetstream\\Features; |
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
// Example at https://nukedbit.dev/a-simple-extension-to-use-combine-with-promisekit/ | |
extension Promise { | |
var publisher : AnyPublisher<T, Error> { | |
Future<T, Error> { | |
promise in | |
self.done { | |
body in | |
promise(.success(body)) | |
}.catch { | |
error in |
NewerOlder