Skip to content

Instantly share code, notes, and snippets.

View arvindsvt's full-sized avatar

Arvind Shrivastwa arvindsvt

  • Ahmedabad
View GitHub Profile
@arvindsvt
arvindsvt / dark admin
Last active May 3, 2024 13:41
dark admin
https://techzaa.getappui.com/velonic/index.html
https://techzaa.getappui.com/velonic/layouts/tables-datatable.html
file:///C:/Users/Dell/Desktop/New%20folder/New%20folder/New%20folder/techzaa.getappui.comveloniclayoutstables-datatable.html
<html lang="en" data-bs-theme="dark" data-layout-mode="fluid" data-menu-color="dark" data-topbar-color="light"
data-layout-position="fixed" data-sidenav-size="default" class="menuitem-active">
<head>
<meta charset="utf-8">
<title>Datatables | Velonic - Bootstrap 5 Admin &amp; Dashboard Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@arvindsvt
arvindsvt / sqlcrudephp-api-with-jwt-auth-blob-master
Created April 29, 2024 14:20
sqlcrudephp-api-with-jwt-auth-blob-master
<?php
class Database
{
private $localhost = "localhost";
private $username = "root";
private $password = "";
private $database = "php_api_jwt";
private $mysqli = "";
private $result = array();
@arvindsvt
arvindsvt / validate
Created April 26, 2024 02:16
validate
if(empty($data_to_db['user_name'])) {
$_SESSION['errors']['user_name'] = "User name is required";
}
if(empty($data_to_db['user_email'])) {
$_SESSION['errors']['user_email'] = "Email is required";
}
if( filter_var( $data_to_db['user_email'] , FILTER_VALIDATE_EMAIL) ) {
$_SESSION['errors']['user_email'] = "Email is required";
}
if (empty($data_to_db['password'])) {
@arvindsvt
arvindsvt / model form offcanvas table metarial
Last active April 16, 2024 15:50
model form offcanvas table metarial
https://www.freecodecamp.org/news/how-to-build-a-dropdown-menu-with-javascript/
Multi Select Dropdown with Search in Bootstrap 5 https://codepen.io/mohan-aiyer/pen/gOWveJE
https://demos.codexworld.com/multi-select-dropdown-list-with-checkbox-jquery/
https://www.youtube.com/watch?v=fZgGc9XoZ6U https://drive.google.com/file/d/152j7Er6q5MeFPQPpJ7XmqfQjCqRzBNmD/view
https://laraget.com/blog/select2-and-laravel-ajax-autocomplete
https://www.techiediaries.com/laravel-8-ajax-crud-modal-pagination/
<!DOCTYPE html>
<!--
Template Name: Stack - Stack - Bootstrap 4 Admin Template
Author: PixInvent
@arvindsvt
arvindsvt / request-only-not-work-laravel
Last active April 14, 2024 15:44
request-only-not-work-laravel
https://stackoverflow.com/questions/38271551/why-does-if-statement-with-request-only-not-work-laravel
$request->only('name', 'age', 'cheese');
// ['name' => 'Pingu', 'age' => '22', 'cheese' => 'gorgonzola']
// Retrieve a portion of the validated input data...
$validated = $request->safe()->only(['name', 'email']);
$validated = $request->safe()->except(['name', 'email']);
add this function to our escaped blade statement:
https://stackoverflow.com/questions/78154387/laravel11-mysql-migration-problem-with-collation-general-error-1273-unknown-c
DB_COLLATION=utf8mb4_unicode_ci
@arvindsvt
arvindsvt / dropzone-ckeditor-image-upload
Last active April 12, 2024 05:15
dropzone-ckeditor-image-upload
https://www.itsolutionstuff.com/post/laravel-6-ckeditor-image-upload-exampleexample.html
https://stackoverflow.com/questions/32810231/add-public-to-asset-path-in-laravel
//https://www.positronx.io/laravel-drag-and-drop-image-file-upload-tutorial-with-example/
Route::get('upload-ui', [FileUploadController::class, 'dropzoneUi' ]);
https://www.fundaofwebit.com/post/drag-and-drop-image-file-upload-in-laravel#google_vignette
https://dev.to/kingsconsult/how-to-upload-files-with-drag-n-drop-and-image-preview-in-laravel-8-using-dropzone-49hd
//https://phppot.com/javascript/dropzone-progress-bar/
Route::post('file-upload', [FileUploadController::class, 'dropzoneFileUpload' ])->name('dropzoneFileUpload');
@arvindsvt
arvindsvt / validate-an-api-request-in-laravel
Last active April 14, 2024 16:21
validate-an-api-request-in-laravel
https://medium.com/@sgandhi132/how-to-validate-an-api-request-in-laravel-35b46470ba88
https://www.youtube.com/watch?v=IvKMPwybSKI
Final code of “LoginRequest.php” file
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Contracts\Validation\Validator;
class LoginRequest extends FormRequest
@arvindsvt
arvindsvt / disable-laravel-eloquent-auto-incrementcustom-primary-key
Last active April 6, 2024 09:48
disable-laravel-eloquent-auto-incrementcustom-primary-key
class UserVerification extends Model
{
// if your key name is not 'id'
// you can also set this to null if you don't have a primary key
protected $primaryKey = 'your_key_name';
public $incrementing = false;
// In Laravel 6.0+ make sure to also set $keyType
protected $keyType = 'string';
@arvindsvt
arvindsvt / resumable-large-file-uploads-in-chunks-laravel
Last active April 3, 2024 04:07
resumable-large-file-uploads-in-chunks-laravel
https://shouts.dev/articles/laravel-upload-large-file-with-resumablejs-and-laravel-chunk-upload
https://github.com/shoutsdev/laravel-file-upload-with-resumablejs/blob/main/resources/views/upload.blade.php
https://stackcoder.in/posts/php-resumable-large-file-uploads-in-chunks-using-flowjs
https://medium.com/@hassanrazadev/how-to-upload-large-files-in-laravel-web-application-bde34da8b242
https://webdock.io/en/docs/how-guides/laravel-guides/laravel-chunked-upload-uploading-huge-files
https://techvblogs.com/blog/importing-large-csv-files-in-mysql-using-laravel
@arvindsvt
arvindsvt / adminFormTablaeDashboard
Created March 31, 2024 15:19
adminFormTablaeDashboard
<!DOCTYPE html>
<!--
Template Name:: SmartAdmin PHP Responsive WebApp - Template built with Bootstrap 4 and PHP
Version: 4.5.3
Author: Jovanni Lo
Website: https://smartadmin.lodev09.com
Purchase: https://wrapbootstrap.com/theme/smartadmin-php-responsive-webapp-WB05M9585
License: You must have a valid license purchased only from wrapbootstrap.com (link above) in order to legally use this theme for your project.
-->