Skip to content

Instantly share code, notes, and snippets.

View marufsharia's full-sized avatar
🎯
Focusing

Abdullah Al Maruf marufsharia

🎯
Focusing
View GitHub Profile
@marufsharia
marufsharia / README.md
Created January 7, 2024 08:30 — forked from abelcallejo/README.md
Laravel Cheatsheet

Laravel Cheatsheet

Installation

# Prepare the working directory
cd /path/to/www
git clone git@github.com:goodyweb/example-app.git
cd /path/to/www/example-app
@marufsharia
marufsharia / CreateComment.php
Created January 6, 2024 15:28 — forked from fotrino/CreateComment.php
@mentions with Alpine.js, Livewire & Tributeq
<?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\User;
class CreateComment extends Component
{
public $mentionables;
@marufsharia
marufsharia / ExportCSV.php
Created October 24, 2023 19:11 — forked from MrPunyapal/ExportCSV.php
PHP Function to Export Products as CSV (without saving it in server)
<?php
function exportCSV()
{
// Define response headers for CSV download
$headers = [
"Content-type" => "text/csv",
// Specifies the content type as CSV
"Content-Disposition" => "attachment; filename=products.csv",
// Instructs the browser to treat it as a downloadable attachment with the filename 'products.csv'
@marufsharia
marufsharia / WithAggregate.php
Created October 24, 2023 19:09 — forked from MrPunyapal/WithAggregate.php
🚀 Laravel Tip: Optimize Queries with withAggregate 📊
<?php
// In the Post model
class Post extends Model
{
public function user()
{
return $this->belongsTo(User::class);
}
}
@marufsharia
marufsharia / dio_config.dart
Created October 24, 2023 15:01 — forked from Kaival-Patel/dio_config.dart
Dio Configuration for working with api calls in flutter
import 'dart:io';
import 'package:dio/dio.dart';
class Api {
final dio = createDio();
String _token = "";
String _apiKey = "";
Api._internal();
@marufsharia
marufsharia / main.dart
Created December 30, 2022 06:00 — forked from eduardoflorence/main.dart
Getx - Sample Form
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(GetMaterialApp(
initialRoute: '/login',
getPages: [
GetPage(
name: '/login',
page: () => LoginPage(),
@marufsharia
marufsharia / main.dart
Created December 30, 2022 05:59 — forked from eduardoflorence/main.dart
GetX - Sample GetConnect
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(GetMaterialApp(
initialRoute: '/home',
getPages: [
GetPage(
name: '/home',
page: () => HomePage(),
@marufsharia
marufsharia / Tagify.php
Created October 17, 2022 17:04 — forked from localdisk/Tagify.php
Livewire Tagify Component
<?php
namespace App\Http\Livewire;
use App\Models\Tag;
use Illuminate\View\View;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\Container\BindingResolutionException;
use Livewire\Component;

A Collection of my most useful Gist Entries

This list is in no particular order!


A Collection of my most useful Gist Entries

This list is in no particular order!

@marufsharia
marufsharia / jquery.plugin-boilerplate.js
Created August 29, 2022 14:54 — forked from JunaidQadirB/jquery.plugin-boilerplate.js
Use this boilerplate to instantly get started with jQuery plugin development.
/**
* A jQuery plugin boilerplate.
* Author: Jonathan Nicol @f6design
*/
;(function($) {
var pluginName = 'demoplugin';
function Plugin(element, options) {
var el = element;
var $el = $(element);