// docs : https://github.com/CodeSeven/toastr*****YouhaveToputalertinscriptssection// @yield('scripts')*****// Display a warning toast, with no titletoastr.warning('My name is Inigo Montoya. You killed my father, prepare to die!')// Display a success toast, with a titletoastr.success('Have fun storming the castle!','Miracle Max Says')// Display an error toast, with a titletoastr.error('I do not think that word means what you think it means.','Inconceivable!')// Immediately remove current toasts without using animationtoastr.remove()// Remove current toasts using animationtoastr.clear()// Override global optionstoastr.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']]);
# 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*/<divclass="col-12 px-0 mt-2 px-0"><divclass="col-12 mt-2"style="overflow: hidden"><divclass="col-12 px-0"id="file-uploader-nafezly-main"><inputtype="hidden"disabledclass="file-uploader-uploaded-files"><inputname="attachment"type="file"multipleclass="file-uploader-files"data-fileuploader-files=""style="opacity: 0"/><!--
# forrenderingolduploadedfiles<inputname="attachment"type="file"multipleclass="file-uploader-files"data-fileuploader-files='@include('site-templates.uploaded-files-array',['files'=>$item->uploaded_files()])' style="opacity: 0" />
# uploaded_files=>isalaravelcollection--></div></div></div>
/*for multiple uploads*/
<divclass="col-12 px-0 mt-2 px-0"><divclass="col-12 mt-2"style="overflow: hidden"><divclass="col-12 px-0"id="file-uploader-nafezly-second"><inputtype="hidden"disabledclass="file-uploader-uploaded-files"><inputname="attachment"type="file"multipleclass="file-uploader-files"data-fileuploader-files=""style="opacity: 0"/><!--
# forrenderingolduploadedfiles<inputname="attachment"type="file"multipleclass="file-uploader-files"data-fileuploader-files='@include('site-templates.uploaded-files-array',['files'=>$item->uploaded_files()])' style="opacity: 0" />
# uploaded_files=>isalaravelcollection--></div></div></div>
Fancybox
/* Just Add this Tag To image */<imgsrc=""data-fancybox/>/* Every image inside this class "data-fancybox" will be converted to fancy */<divclass="fancybox"><imgsrc=""/></div>
/* just add this id to form like this */<formid="validate-form"></form>/*or add this code to the end of the page */<formid="custom-validation"></form>
@section('content')
<scripttype="text/javascript">
$("#custom-validation").validate();
</script>
@endsection
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dashboard.settings' doesn't exist (SQL: select * from settings limit 1)
at C:\xampp\htdocs\dashboard\vendor\laravel\framework\src\Illuminate\Database\Connection.php:703
699▕ // If an exception occurs when attempting to run a query, we'll format the error
700▕ // message to include the bindings with SQL, which will make this exception a
701▕ // lot more helpful to the developer instead of just the database's errors.
702▕ catch (Exception $e) {
➜ 703▕ throw new QueryException(
704▕ $query, $this->prepareBindings($bindings), $e
705▕ );
706▕ }
707▕ }
Instead of storing different sizes of an image, you can use laravel-glide to do an image size on the fly and save a cached version so if you used the same size elsewhere in the future.
its more dynamic and gives you more options in the future
The user's photo will be changed to a new one, so I see no need to keep the old one. How do I delete old photos when a user changes their profile picture
And you can also add it, and the same thing when I delete a user from admin, delete his picture, and the same thing with the rest, such as articles, categories, ....
I think it will be better and will save space on the server
and this
include(F:\xampp\htdocs\dashboard-peter\vendor\composer/../../app/View/Components/Notifications.php): Failed to open stream: No such file or directory
Congratulation for this lovely system and for the hard work on it.
I see that you use my Laravel package yoeunes/toastr which is deprecated as mentioned in the github documentation, the package is only a proxy to the php-flasher/flasher-toastr-laravel.