Skip to content

Instantly share code, notes, and snippets.

View aldhinya's full-sized avatar
😂
I may be slow to respond.

Fadhilatur Rochman aldhinya

😂
I may be slow to respond.
View GitHub Profile
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Admin extends User
{
protected $table = 'admin';
public $primaryKey = 'id_admin';
public function bulkinsert(Request $request)
{
$request->validate([
'file' => 'required',
]);
if ($request->hasFile('file')) {
$file = $request->file->getClientOriginalName();
$filename = Str::slug(pathinfo($file, PATHINFO_FILENAME));
public function export_excel()
{
$data = Toko::join('perusahaan','perusahaan.id_perusahaan','toko.perusahaan_id')
->join('daerah','daerah.id_daerah','toko.daerah_id')
->orderBy('toko.id_toko', 'desc')
->get();
return Excel::download(new TokoExport($data), 'Toko_' . Carbon::now()->format('d-m-Y_H-i-s') . '.xlsx');
}
<VirtualHost 149.28.164.16:80>
ServerName 321.adhitamamitranusantara.com
ServerAlias www.321.adhitamamitranusantara.com
ServerAdmin webmaster@321.adhitamamitranusantara.com
DocumentRoot /home/321adhi/public_html
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/321.adhitamamitranusantara.com.bytes bytes
CustomLog /usr/local/apache/domlogs/321.adhitamamitranusantara.com.log combined
ErrorLog /usr/local/apache/domlogs/321.adhitamamitranusantara.com.error.log
@aldhinya
aldhinya / CekLoginAdmin.php
Created October 5, 2021 16:56
Laravel Manual Middleware
<?php
namespace App\Http\Middleware\Auth;
use Closure;
use Illuminate\Support\Facades\Auth;
class CekLoginAdmin
{
public function handle($request, Closure $next)
function modalSAProses() {
Swal.fire({
title: "Sedang Memproses",
text: "Mohon tunggu sebentar",
showConfirmButton: false,
showCancelButton: false,
allowOutsideClick: false,
allowEscapeKey: false,
showCloseButton: false,
focusConfirm: false,
<?php
header('Location: https://domain.com/');
exit;
?>
import 'package:flutter/material.dart';
import 'package:flutter_task/mainmenu.dart';
class Login extends StatefulWidget {
@override
_LoginPageState createState() => _LoginPageState();
}
class _LoginPageState extends State<Login> {
String username, password;
package com.example.tugasandroid1;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformationMethod;
import android.view.View;
import android.widget.Button;