Anyone who used Laravel with AWS and maybe Jenkins?

|
justine_chacko 2020-12-20 16:20:22
If I added tinymce editor to laravel what security measures are needed for vulnarabilities, like script ececution etc
sickxdemon 2020-12-20 16:22:00
Anyone who used Laravel with AWS and maybe Jenkins?
amirvalhalla 2020-12-20 16:31:28
sepehrpg 2020-12-20 15:55:18
hi I have a problem with laravel being slow on real host.

each page takes 1 minute to load and the icons do not load proberly.

can anyone help me?

php artisan config:cache
php artisan view:cache
php artisan route:cache
also instead of all of above commands you can use below command but if you’re using laravel version 7 or 8 i’m suggesting you above commands
php artisan optimize

shaildark 2020-12-20 16:37:58
JeevaniSM 2020-12-20 12:42:18
another query -for a delete post call by AJAX ( say 5 images in the page and button to delete each one. once we delete one image with click, how to AJAX load the page ( shows only 4 page ) – using Laravel ?

in a delete ajax call, delete one image and select 4 images and send it as a response to your delete ajax query, and replace the existing div part where you loaded 5 images with the response you get from delete ajax call

sepehrpg 2020-12-20 16:40:16
amirvalhalla 2020-12-20 16:31:28
php artisan config:cache
php artisan view:cache
php artisan route:cache
also instead of all of above commands you can use below command but if you’re using laravel version 7 or 8 i’m suggesting you above commands
php artisan optimize

project uploaded on the host
how can I use php artisan commands on host ?

amirvalhalla 2020-12-20 16:40:48
sepehrpg 2020-12-20 16:40:16
project uploaded on the host
how can I use php artisan commands on host ?

You don’t have terminal access in your host?

sobirjonovs 2020-12-20 16:41:15
sepehrpg 2020-12-20 16:40:16
project uploaded on the host
how can I use php artisan commands on host ?

if you don’t have access t terminal, you should create route for Artisan command.

You can use artisan commands via Artisan class

sepehrpg 2020-12-20 16:41:22
amirvalhalla 2020-12-20 16:40:48
You don’t have terminal access in your host?

no

amirvalhalla 2020-12-20 16:42:57
sepehrpg 2020-12-20 16:41:22
no

Use
Artisan::call(‘your command’)

sobirjonovs 2020-12-20 16:44:33
amirvalhalla 2020-12-20 16:42:57
Use
Artisan::call(‘your command’)

he should search on google ))) you gave complete answer.

sepehrpg 2020-12-20 16:46:23
amirvalhalla 2020-12-20 16:42:57
Use
Artisan::call(‘your command’)

thank you 🌹

amirvalhalla 2020-12-20 16:48:12
sepehrpg 2020-12-20 16:46:23
thank you 🌹

You’re welcome

elhajjouji 2020-12-20 17:08:46
Hi. I have a problem with project laravel vuejs. After I upload the project to a server, a white page appears with an error in the console app. Js not found .. Please help.
Romil 2020-12-20 17:39:05
elhajjouji 2020-12-20 17:08:46
Hi. I have a problem with project laravel vuejs. After I upload the project to a server, a white page appears with an error in the console app. Js not found .. Please help.

May be you have permission issue

Romil 2020-12-20 17:39:42
Check in your server all permission is ok or not
elhajjouji 2020-12-20 17:43:15
I GIVE THE PERMISSION 777 TO FOLDER STORAGE and VENDOR AND FOLDER BOOTSTRAP but not work
amirvalhalla 2020-12-20 18:23:58
elhajjouji 2020-12-20 17:43:15
I GIVE THE PERMISSION 777 TO FOLDER STORAGE and VENDOR AND FOLDER BOOTSTRAP but not work

When you’ve deployed your project on your host you have to serve it to work

amirvalhalla 2020-12-20 18:25:16
Did you do that?
focalfossa20 2020-12-20 18:59:17
Jomitz 2020-12-20 06:05:55
Send the join query code for pagination

https://pastebin.com/bQsGJsej

controller – Pastebin.comPastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Muheebpasha 2020-12-20 19:19:04
Need your help I’m trying to do image crud operation using ajax in laravel 8 but still no output kindly comments the solution… Code

Here is my code…
<script type=”text/javascript”>
$(document).ready(function (e) {
$(‘#laravel_crud’).show();
$.ajaxSetup({
headers: {
‘X-CSRF-TOKEN’: $(‘meta[name=”csrf-token”]’).attr(‘content’)
}
});
$(‘#image’).change(function(){
let reader = new FileReader();
reader.onload = (e) => {
$(‘#display-image-preview’).attr(‘src’, e.target.result);
}
reader.readAsDataURL(this.files[0]);
});
$(‘#ajax-image-upload-form’).submit(function(e) {
e.preventDefault();
var formData = new FormData(this);
$.ajax({
type:’POST’,
url: “{{ url(‘/post’)}}”,
data: formData,
cache:false,
contentType: false,
processData: false,
success: (data) => {
this.reset();
//alert(‘Image has been uploaded!’);
window.location.reload();
},
error: function(data){
console.log(data);
}
});
});
});
</script>
controller
public function store(Request $request)
{
request()->validate([
‘image’ => ‘required|image|mimes:jpeg,png,jpg,gif,svg|max:2048’,
‘body’ => ‘required’,
]);
$response = Response()->json([
“success” => false,
“image” => ”,
“body” => ”
]);
if ($files = $request->file(‘image’))
{
$destinationPath = ‘public/images/’; // upload path
$imageName = date(‘YmdHis’) . “.” . $files->getClientOriginalExtension();
$files->move($destinationPath, $imageName);
$post= new Post;
$post->title = “$imageName”;
$post->body = $request->body;
$post->user()->associate($request->user());
$post->save();
}
$response = Response()->json([
“success” => true,
“image” => $post
]);
this code is working to store now need help to update
return Response()->json($response);
}

Muheebpasha 2020-12-20 19:19:19
Need your help I’m trying to do image crud operation using ajax in laravel 8 but still no output kindly comments the solution… Code

Here is my code…
<script type=”text/javascript”>
$(document).ready(function (e) {
$(‘#laravel_crud’).show();
$.ajaxSetup({
headers: {
‘X-CSRF-TOKEN’: $(‘meta[name=”csrf-token”]’).attr(‘content’)
}
});
$(‘#image’).change(function(){
let reader = new FileReader();
reader.onload = (e) => {
$(‘#display-image-preview’).attr(‘src’, e.target.result);
}
reader.readAsDataURL(this.files[0]);
});
$(‘#ajax-image-upload-form’).submit(function(e) {
e.preventDefault();
var formData = new FormData(this);
$.ajax({
type:’POST’,
url: “{{ url(‘/post’)}}”,
data: formData,
cache:false,
contentType: false,
processData: false,
success: (data) => {
this.reset();
//alert(‘Image has been uploaded!’);
window.location.reload();
},
error: function(data){
console.log(data);
}
});
});
});
</script>
controller
public function store(Request $request)
{
request()->validate([
‘image’ => ‘required|image|mimes:jpeg,png,jpg,gif,svg|max:2048’,
‘body’ => ‘required’,
]);
$response = Response()->json([
“success” => false,
“image” => ”,
“body” => ”
]);
if ($files = $request->file(‘image’))
{
$destinationPath = ‘public/images/’; // upload path
$imageName = date(‘YmdHis’) . “.” . $files->getClientOriginalExtension();
$files->move($destinationPath, $imageName);
$post= new Post;
$post->title = “$imageName”;
$post->body = $request->body;
$post->user()->associate($request->user());
$post->save();
}
$response = Response()->json([
“success” => true,
“image” => $post
]);
this code is working to store now need help to update
return Response()->json($response);
}

Muheebpasha 2020-12-20 19:20:42
Hi guys kindly provide me the solution for this
zmtrn 2020-12-20 20:21:12
Heya..

I’ve activated ssl on cpanel n all apis n site may use https.. but i can’t access the cpanel n whm through https..

when i attempt :

myDomain.com/cpanel

It redirects to:

myHostname:port

N it doesn’t use ssl;
..

Tnx a zill ☘️

2020-12-20 20:40:00
Muheebpasha 2020-12-20 19:19:19
Need your help I’m trying to do image crud operation using ajax in laravel 8 but still no output kindly comments the solution… Code

Here is my code…
<script type=”text/javascript”>
$(document).ready(function (e) {
$(‘#laravel_crud’).show();
$.ajaxSetup({
headers: {
‘X-CSRF-TOKEN’: $(‘meta[name=”csrf-token”]’).attr(‘content’)
}
});
$(‘#image’).change(function(){
let reader = new FileReader();
reader.onload = (e) => {
$(‘#display-image-preview’).attr(‘src’, e.target.result);
}
reader.readAsDataURL(this.files[0]);
});
$(‘#ajax-image-upload-form’).submit(function(e) {
e.preventDefault();
var formData = new FormData(this);
$.ajax({
type:’POST’,
url: “{{ url(‘/post’)}}”,
data: formData,
cache:false,
contentType: false,
processData: false,
success: (data) => {
this.reset();
//alert(‘Image has been uploaded!’);
window.location.reload();
},
error: function(data){
console.log(data);
}
});
});
});
</script>
controller
public function store(Request $request)
{
request()->validate([
‘image’ => ‘required|image|mimes:jpeg,png,jpg,gif,svg|max:2048’,
‘body’ => ‘required’,
]);
$response = Response()->json([
“success” => false,
“image” => ”,
“body” => ”
]);
if ($files = $request->file(‘image’))
{
$destinationPath = ‘public/images/’; // upload path
$imageName = date(‘YmdHis’) . “.” . $files->getClientOriginalExtension();
$files->move($destinationPath, $imageName);
$post= new Post;
$post->title = “$imageName”;
$post->body = $request->body;
$post->user()->associate($request->user());
$post->save();
}
$response = Response()->json([
“success” => true,
“image” => $post
]);
this code is working to store now need help to update
return Response()->json($response);
}

Use the same name for inserting and updating so while updating an image the corressponding old image gets replaced by new image

Muheebpasha 2020-12-20 20:40:46
2020-12-20 20:40:00
Use the same name for inserting and updating so while updating an image the corressponding old image gets replaced by new image

Explain me with example

2020-12-20 20:44:01
Now your are going to insert a new image with file name as Image1 and Now your are going to update the Image1, So while updating the Image1 use the same name ‘Image1’ for the newly updated image
2020-12-20 20:44:46
So that the old image gets replaced by new one if the name and extensions are same
Muheebpasha 2020-12-20 20:44:56
2020-12-20 20:44:01
Now your are going to insert a new image with file name as Image1 and Now your are going to update the Image1, So while updating the Image1 use the same name ‘Image1’ for the newly updated image

Ok I’ll try this code 😊

Muheebpasha 2020-12-20 22:37:42
laravel_discuss-63449.jpg

Muheebpasha 2020-12-20 22:38:15
laravel_discuss-63450.jpg
When I click Edit
Muheebpasha 2020-12-20 22:39:08
laravel_discuss-63451.jpg
Record is updated with the last record but not with the current record which I edited…
Muheebpasha 2020-12-20 22:39:20
Help me this
JeevaniSM 2020-12-20 22:49:06
shaildark 2020-12-20 16:37:58
in a delete ajax call, delete one image and select 4 images and send it as a response to your delete ajax query, and replace the existing div part where you loaded 5 images with the response you get from delete ajax call

ok thanx , I got it but now the AJAX button click work first time, everything cool, I loaded the partial view to the html by jqwuery, but the button is firing the second time, I need to refresh page.. any idea why ?

JeevaniSM 2020-12-20 22:49:44
AJAX button works first time, load the page which is a partial view rendered by laravel, but second time th bbutton is not firing
2020-12-20 23:33:48
How to integrate biomatric device with laravel
|