Giter Club home page Giter Club logo

dashboard's Introduction

Simple Arabic Laravel Dashboard

  • ✅ Auto Seo
  • ✅ Optimized Notifications With Images
  • ✅ Smart Alerts
  • ✅ Auto Js Validations
  • ✅ Front End Alert
  • ✅ Nice Image Viewing FancyBox
  • ✅ Drag And drop Feature
  • ✅ Fully Arabic 😀
  • ✅ Smart Editor With Upload Images
  • ✅ Select from Already uploaded Files
  • ✅ Fully Profile System With Avatars ( Can Resize Avatar )
  • ✅ Fully Responsive
  • ✅ Intervally Getting Notifcations Out Of The Box
  • ✅ FontAwesome PRO 💥 + ResponsiveFonts + Noto Sans Arabic fonts Included
  • ✅ Robots.txt and SiteMapGenerator

https://raw.githubusercontent.com/peter-tharwat/dashboard/master/screenshot.jpg

Main Yield Sections

@yield('styles')
@yield('content')
@yield('after-body')
@yield('scripts')

Notifications On Response

// docs : https://github.com/mckenziearts/laravel-notify

notify()->info('content','title');

notify()->success('content','title');

notify()->error('content','title');

Notifications On Frontend

// docs : https://github.com/CodeSeven/toastr
*****
You have To put alert in scripts section
// @yield('scripts')
*****
// Display a warning toast, with no title
toastr.warning('My name is Inigo Montoya. You killed my father, prepare to die!')

// Display a success toast, with a title
toastr.success('Have fun storming the castle!', 'Miracle Max Says')

// Display an error toast, with a title
toastr.error('I do not think that word means what you think it means.', 'Inconceivable!')

// Immediately remove current toasts without using animation
toastr.remove()

// Remove current toasts using animation
toastr.clear()

// Override global options
toastr.success('We do have the Kapua suite available.', 'Turtle Bay Resort', {timeOut: 5000})

Notification to [ 'dashboard' , 'email' ]

(new \MainHelper)->notify_user([
      'user_id'=>2,
      'message'=>"محتوى الإشعار" ,
      'url'=>"http://example.com",
			'methods'=>['database','mail']
]);

Editor with and without file-explorer

<textarea type="text" name="description" required minlength="3" maxlength="10000" class="form-control editor with-file-explorer" ></textarea>
<textarea type="text" name="description" required minlength="3" maxlength="10000" class="form-control editor"  ></textarea>

Upload Files

#Upload File
$this->store_file([
    'source'=>$request->file,
    'validation'=>"image",
    'path_to_save'=>'/uploads/users/',
    'type'=>'AVATAR', 
    'user_id'=>\Auth::user()->id,
    'resize'=>[500,3000],
    'small_path'=>'small/',
    'visibility'=>'PUBLIC',
    'file_system_type'=>env('FILESYSTEM_DRIVER'),
    'watermark'=>true,
    'compress'=>'auto',
])['filename'];

#Use File
$this->use_hub_file('file_name','type_id','user_id');

#Remove File
$this->remove_hub_file('file_name');

Drag And Drop Feature

# You have to use this code inside @section('scripts')

#for single upload
@include('admin.templates.dropzone',[
		'selector'=>'#file-uploader-nafezly-main',
		'url'=> route('admin.upload.file'),
		'method'=>'POST',
		'remove_url'=>route('admin.upload.remove-file'),
		'remove_method'=>'POST',
		'enable_selector_after_upload'=>'#submitEvaluation',
		'max_files'=>1,
		'max_file_size'=>'50',
		'accepted_files'=>"['image/*']"
])

#for multiplue uploads
@include('admin.templates.dropzone',[
		'selector'=>'#file-uploader-nafezly-second',
		'url'=> route('admin.upload.file'),
		'method'=>'POST',
		'remove_url'=>route('admin.upload.remove-file'),
		'remove_method'=>'POST',
		'enable_selector_after_upload'=>'#submitEvaluation',
		'max_files'=>100,
		'max_file_size'=>'50',
		'accepted_files'=>"['image/*']"
])
/* You have To import this code inside */

/*for single upload*/
<div class="col-12  px-0 mt-2 px-0">
    <div class="col-12 mt-2" style="overflow: hidden">
        <div class="col-12 px-0" id="file-uploader-nafezly-main">
            <input name="file" type="file" multiple class="file-uploader-files" data-fileuploader-files="" style="opacity: 0" data-fileuploader-listInput="fileuploader-list-file-main" />
        </div> 
    </div>
 </div>

/*for multiple uploads*/
<div class="col-12  px-0 mt-2 px-0">
    <div class="col-12 mt-2" style="overflow: hidden">
        <div class="col-12 px-0" id="file-uploader-nafezly-second">
            <input type="hidden" name="uploaded_files" value="" class="file-uploader-uploaded-files">
            <input name="file" type="file" multiple class="file-uploader-files" data-fileuploader-files="" style="opacity: 0" />
        </div>
    </div>
 </div>

Fancybox

/* Just Add this Tag To image */
<img src="" data-fancybox />

/* Every image inside this class "data-fancybox" will be converted to fancy */
<div class="fancybox">
		<img src="" />
</div>

Configrations .env

FILESYSTEM_DRIVER=local
STORAGE_BASE=/storage
STORAGE_URL="${STORAGE_BASE}"

DEFAULT_IMAGE="${APP_URL}/images/default/image.jpg"
DEFAULT_IMAGE_FAVICON="${APP_URL}/images/default/favicon.png"
DEFAULT_IMAGE_AVATAR="${APP_URL}/images/default/avatar.png"
DEFAULT_IMAGE_LOGO="${APP_URL}/images/default/logo.png"
DEFAULT_IMAGE_WIDELOGO="${APP_URL}/images/default/wide-logo.png"
DEFAULT_IMAGE_COVER="${APP_URL}/images/default/cover.png"
DEFAULT_IMAGE_NOTIFICATION="${APP_URL}/images/default/notification.png"

DEFAULT_EMAIL=admin@admin.com
DEFAULT_PASSWORD=password

Validate Form

/* just add this id  to form like this */
<form id="validate-form"></form>

/*or add this code to the end of the page */

<form id="custom-validation"></form>
@section('content')
<script type="text/javascript">
	$("#custom-validation").validate();
</script>
@endsection

Controlling Accessibility To files Viewer

# controlling Accessibility To files Viewer

$files = \App\Models\HubFile::where(function($q){
		//conditions here
})->orderBy('id','DESC')->simplePaginate(24); 
return view('livewire.files-viewer',compact('files'));

dashboard's People

Contributors

peter-tharwat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.