There is so many user that don't know what is browser console. An attacker can steal an information from their account by injecting a malicious javascript. By using this script, developer can easily give a warning for user on the browser console.
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 | |
$popularSerials = Serial::addSelect([ | |
'total_views' => Video::selectRaw('sum(views) as total_views') | |
->whereColumn('serial_id', 'serials.id') | |
->groupBy('serial_id') | |
]) | |
->orderBy('total_views') | |
->get(); |
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\Providers; | |
use Illuminate\Routing\UrlGenerator; | |
use Illuminate\Support\ServiceProvider; | |
class ForceHttpsServiceProvider extends ServiceProvider | |
{ | |
/** |
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
[program:laravelscraper] | |
process_name=%(program_name)s | |
command=php /var/www/manga.zhanang.id/artisan queue:work --tries=3 | |
autostart=true | |
autorestart=true | |
user=root | |
redirect_stderr=true | |
stdout_logfile=/var/www/manga.zhanang.id/storage/logs/scraper.log |
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
<html> | |
<head> | |
<style> | |
.gambar { | |
background-image: url('https://picsum.photos/200'); | |
height: 200px; | |
width: 100%; | |
} | |
</style> | |
</head> |
This is a gist to setup TailwindCSS on your Laravel project. Give me an advice if you have a better idea about this.
- Copy and compare this file to your Laravel project
- Run
yarn run dev:css
to build dev version - Run
yarn run build:css
to build production-ready version
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 Gazeboin\Event\Domain\Services; | |
use Gazeboin\Event\Domain\Entities\EventEntity; | |
use Gazeboin\Event\Domain\Entities\EventAttemptEntity; | |
class AttemptEventService | |
{ | |
public function attempt($eventId, $data) |
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 Gazeboin\Event\Domain\Entities; | |
use Illuminate\Database\Eloquent\Model; | |
class EventEntity extends Model | |
{ | |
protected $table = 'events'; |
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\Controllers\API\V1; | |
use Illuminate\Database\Eloquent\ModelNotFoundException; | |
use Gazeboin\Event\Domain\Services\AttemptEventService; | |
use Gazeboin\Event\Domain\Entities\EventEntity; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; |
app/
Console/
Events/
Exceptions/
CustomException.php
Gazeboin/
src/
Event/
Application/