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 Laravolt\Rbac\Traits; | |
use Illuminate\Database\Eloquent\Collection; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Facades\Cache; | |
use Illuminate\Support\Str; | |
use Laravolt\Platform\Models\Permission; |
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 Laravolt\Rbac\Commands; | |
use Doctrine\DBAL\Exception; | |
use Doctrine\DBAL\Schema\Column; | |
use Doctrine\DBAL\Schema\ForeignKeyConstraint; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Log; | |
use Illuminate\Support\Facades\Route; |
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
trait AutoSearch | |
{ | |
public function scopeAutoSearch(Builder $query, ?string $keyword) | |
{ | |
if ($keyword !== null) { | |
$dbDriver = DB::connection()->getConfig('driver'); | |
if ($dbDriver === 'pgsql') { | |
$columns = Arr::map($this->searchableColumns, fn ($elm) => $elm.'::text'); | |
$query->whereLike($columns, $keyword); |
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 java.util.Scanner; | |
public class Mahasiswa { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
String nama, kelas, jurusan; | |
System.out.print("Nama: "); | |
nama = scanner.nextLine(); | |
System.out.print("Kelas: "); |
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 | |
$data = [ | |
['A', 1], | |
['B', 2], | |
['C', 3], | |
['A', 1], | |
]; | |
$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
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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 android.content.Context; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.view.ViewConfiguration; | |
import android.view.ViewParent; | |
import android.view.ViewTreeObserver; | |
import android.widget.FrameLayout; |