I am new in laravel buddy could you help me how to apply it to my controller?

|
SkipperStrange 2019-05-05 10:33:14
I’m getting “Uncaught TypeError: $(…).fileupload is not a function etc “ which is linked to laravel app.js. The funny part is jquery works ok throughout the app.
codewithah 2019-05-05 11:47:02
Hi dear friends I want to update composer packages with (compose update) and compose show this error to me
Problem 1
– The requested PHP extension ext-mysql_xdevapi * is missing from your system. Install or enable PHP’s mysql_xdevapi extension.
so how I can solve this problem?
2019-05-05 12:08:24
I tried to make download link to my uploaded file (*.docx) from public path “app/public/papers”. Itried alot tutorials including laravel documentation but it didn’t solve my problem.
Laravel 5.8
Here is my route:
Route::get(‘paper-download/{paper_filename}’, ‘PaperController@download’);

Schema::create(‘papers’, function (Blueprint $table) {
$table->increments(‘id’);
$table->integer(‘user_id’)->unsigned();
$table->foreign(‘user_id’)->references(‘id’)->on(‘users’)->onDelete(‘cascade’);
$table->text(‘author’);
$table->text(‘institution’);
$table->text(‘paper_title’);
$table->string(‘paper_filename’);
$table->smallInteger(‘status’)->default(0);
$table->dateTime(‘moderated_at’)->nullable();
$table->timestamps();
});
and here is my downloadcontroller:

public function download($paper_filename)
{
$paper = Paper::find($id);
$paper = public_path().’public/papers’ . $paper->paper_filename .’.docx’;
return response()->download($paper);
}

I found this error:
“The file “C:xampphtdocslaravel projectmoderatorpublicpublic/paperspublic/papers/MXyfCwbxjMxODFhOMakdur4QL2IR5zirzEdLlJqS.docx.docx” does not exist”

Please help

SkipperStrange 2019-05-05 12:09:17
codewithah 2019-05-05 11:47:02
Hi dear friends I want to update composer packages with (compose update) and compose show this error to me
Problem 1
– The requested PHP extension ext-mysql_xdevapi * is missing from your system. Install or enable PHP’s mysql_xdevapi extension.
so how I can solve this problem?

Make sure u habe the stated dependency installed and unvomment it in your php.ini configuration file

SkipperStrange 2019-05-05 12:09:33
Restart your server after that
codewithah 2019-05-05 12:11:38
SkipperStrange 2019-05-05 12:09:17
Make sure u habe the stated dependency installed and unvomment it in your php.ini configuration file

I cheked this steps but is any commnad to say compoers remove any composer data and reinstall agin (no project content)

SkipperStrange 2019-05-05 12:11:41
2019-05-05 12:08:24
I tried to make download link to my uploaded file (*.docx) from public path “app/public/papers”. Itried alot tutorials including laravel documentation but it didn’t solve my problem.
Laravel 5.8
Here is my route:
Route::get(‘paper-download/{paper_filename}’, ‘PaperController@download’);

Schema::create(‘papers’, function (Blueprint $table) {
$table->increments(‘id’);
$table->integer(‘user_id’)->unsigned();
$table->foreign(‘user_id’)->references(‘id’)->on(‘users’)->onDelete(‘cascade’);
$table->text(‘author’);
$table->text(‘institution’);
$table->text(‘paper_title’);
$table->string(‘paper_filename’);
$table->smallInteger(‘status’)->default(0);
$table->dateTime(‘moderated_at’)->nullable();
$table->timestamps();
});
and here is my downloadcontroller:

public function download($paper_filename)
{
$paper = Paper::find($id);
$paper = public_path().’public/papers’ . $paper->paper_filename .’.docx’;
return response()->download($paper);
}

I found this error:
“The file “C:xampphtdocslaravel projectmoderatorpublicpublic/paperspublic/papers/MXyfCwbxjMxODFhOMakdur4QL2IR5zirzEdLlJqS.docx.docx” does not exist”

Please help

Check how you sabe the path to your file

SkipperStrange 2019-05-05 12:16:23
codewithah 2019-05-05 12:11:38
I cheked this steps but is any commnad to say compoers remove any composer data and reinstall agin (no project content)

Try a hard reset

codewithah 2019-05-05 12:16:46
SkipperStrange 2019-05-05 12:11:41
Check how you sabe the path to your file

I updated the composer data data with default data and the error gone. I just need to install additional packages

Tererai Mugova 2019-05-05 12:24:25
2019-05-05 12:08:24
I tried to make download link to my uploaded file (*.docx) from public path “app/public/papers”. Itried alot tutorials including laravel documentation but it didn’t solve my problem.
Laravel 5.8
Here is my route:
Route::get(‘paper-download/{paper_filename}’, ‘PaperController@download’);

Schema::create(‘papers’, function (Blueprint $table) {
$table->increments(‘id’);
$table->integer(‘user_id’)->unsigned();
$table->foreign(‘user_id’)->references(‘id’)->on(‘users’)->onDelete(‘cascade’);
$table->text(‘author’);
$table->text(‘institution’);
$table->text(‘paper_title’);
$table->string(‘paper_filename’);
$table->smallInteger(‘status’)->default(0);
$table->dateTime(‘moderated_at’)->nullable();
$table->timestamps();
});
and here is my downloadcontroller:

public function download($paper_filename)
{
$paper = Paper::find($id);
$paper = public_path().’public/papers’ . $paper->paper_filename .’.docx’;
return response()->download($paper);
}

I found this error:
“The file “C:xampphtdocslaravel projectmoderatorpublicpublic/paperspublic/papers/MXyfCwbxjMxODFhOMakdur4QL2IR5zirzEdLlJqS.docx.docx” does not exist”

Please help

Use asset(‘papers/’…..)

codewithah 2019-05-05 12:24:32
SkipperStrange 2019-05-05 12:16:23
Try a hard reset

Thank your for your reponse and your help

2019-05-05 12:30:01
Tererai Mugova 2019-05-05 12:24:25
Use asset(‘papers/’…..)

I am new in laravel buddy could you help me how to apply it to my controller?

hamidshariati_ir 2019-05-05 12:32:09
is there anybody used voyager?
2019-05-05 13:33:45
Laracast series as free!!pv
RdotDev 2019-05-05 14:22:58
2019-05-05 12:08:24
I tried to make download link to my uploaded file (*.docx) from public path “app/public/papers”. Itried alot tutorials including laravel documentation but it didn’t solve my problem.
Laravel 5.8
Here is my route:
Route::get(‘paper-download/{paper_filename}’, ‘PaperController@download’);

Schema::create(‘papers’, function (Blueprint $table) {
$table->increments(‘id’);
$table->integer(‘user_id’)->unsigned();
$table->foreign(‘user_id’)->references(‘id’)->on(‘users’)->onDelete(‘cascade’);
$table->text(‘author’);
$table->text(‘institution’);
$table->text(‘paper_title’);
$table->string(‘paper_filename’);
$table->smallInteger(‘status’)->default(0);
$table->dateTime(‘moderated_at’)->nullable();
$table->timestamps();
});
and here is my downloadcontroller:

public function download($paper_filename)
{
$paper = Paper::find($id);
$paper = public_path().’public/papers’ . $paper->paper_filename .’.docx’;
return response()->download($paper);
}

I found this error:
“The file “C:xampphtdocslaravel projectmoderatorpublicpublic/paperspublic/papers/MXyfCwbxjMxODFhOMakdur4QL2IR5zirzEdLlJqS.docx.docx” does not exist”

Please help

R u solved this?

2019-05-05 14:25:05
Not yet, i tried too many tutorials but no one solved my problem
SkipperStrange 2019-05-05 18:07:51
SkipperStrange 2019-05-05 10:30:34
Has anyone here ever used query file uploader??

Please can anyone help me with this

skys215 2019-05-05 18:12:34
Whats the question
SkipperStrange 2019-05-05 18:14:52
I’m using blueimp jquery file uploader to do multiple file upload
SkipperStrange 2019-05-05 18:15:16
SkipperStrange 2019-05-05 10:33:14
I’m getting “Uncaught TypeError: $(…).fileupload is not a function etc “ which is linked to laravel app.js. The funny part is jquery works ok throughout the app.

I am experiencing this error

SkipperStrange 2019-05-05 18:16:18
its giving me headache
SkipperStrange 2019-05-05 18:23:06
laravel_discuss-5713.jpg

SkipperStrange 2019-05-05 18:25:57
laravel_discuss-5714.jpg
This is the file
Ahmed Magdi 2019-05-05 18:26:43
Try ftp protocol
SkipperStrange 2019-05-05 18:27:30
I don’t think the plugin supports ftp
Ahmed Magdi 2019-05-05 18:34:26
Your app can’t find jquery
SkipperStrange 2019-05-05 18:44:44
Yes
SkipperStrange 2019-05-05 18:44:59
But it works everywhere else in the app
SkipperStrange 2019-05-05 18:45:06
That’s the problem
skys215 2019-05-05 18:45:36
check if the jquery and the uploader plugin is loaded
SkipperStrange 2019-05-05 18:51:16
Everything loads fine
SkipperStrange 2019-05-05 18:57:37
Been trying to order the scripts differently
SkipperStrange 2019-05-05 18:57:45
Still no solution
skys215 2019-05-05 18:58:55
can you post it on jsfiddle or somewhere?
SkipperStrange 2019-05-05 18:59:49
I normally use liveshare on vscode
skys215 2019-05-05 19:01:39
just post somewhere
SkipperStrange 2019-05-05 19:04:11
https://jsfiddle.net/#&togetherjs=np73p3LCGu

JSFiddle – Code Playgroundjsfiddle.net
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
SkipperStrange 2019-05-05 19:06:48
Js fiddle isn’t helping
DesolatorMagno 2019-05-05 19:10:40
2019-05-05 12:08:24
I tried to make download link to my uploaded file (*.docx) from public path “app/public/papers”. Itried alot tutorials including laravel documentation but it didn’t solve my problem.
Laravel 5.8
Here is my route:
Route::get(‘paper-download/{paper_filename}’, ‘PaperController@download’);

Schema::create(‘papers’, function (Blueprint $table) {
$table->increments(‘id’);
$table->integer(‘user_id’)->unsigned();
$table->foreign(‘user_id’)->references(‘id’)->on(‘users’)->onDelete(‘cascade’);
$table->text(‘author’);
$table->text(‘institution’);
$table->text(‘paper_title’);
$table->string(‘paper_filename’);
$table->smallInteger(‘status’)->default(0);
$table->dateTime(‘moderated_at’)->nullable();
$table->timestamps();
});
and here is my downloadcontroller:

public function download($paper_filename)
{
$paper = Paper::find($id);
$paper = public_path().’public/papers’ . $paper->paper_filename .’.docx’;
return response()->download($paper);
}

I found this error:
“The file “C:xampphtdocslaravel projectmoderatorpublicpublic/paperspublic/papers/MXyfCwbxjMxODFhOMakdur4QL2IR5zirzEdLlJqS.docx.docx” does not exist”

Please help

Did you even read the error? You are using public path, so why add public again?
RTFE
Look at the link it show at the “The file “C:….”, obviously it is wrong just look at it and you will see what need to be changed.

RdotDev 2019-05-05 19:35:01
SkipperStrange 2019-05-05 18:44:59
But it works everywhere else in the app

Show me the header and footer

SkipperStrange 2019-05-05 19:37:04
laravel_discuss-5734.jpg
This is the header
SkipperStrange 2019-05-05 19:38:07
laravel_discuss-5735.jpg
This is the footer
SkipperStrange 2019-05-05 19:39:20
laravel_discuss-5736.jpg
This is all the js loaded in the blade template needed for the upload
SkipperStrange 2019-05-05 19:39:59
I’m trying a different version of the plugin just to be sure
RdotDev 2019-05-05 19:45:15
SkipperStrange 2019-05-05 19:39:20
This is all the js loaded in the blade template needed for the upload

This codes in another blade file. Right?

SkipperStrange 2019-05-05 19:51:07
Yes
SkipperStrange 2019-05-05 19:51:32
That same blade file runs jquery functions
SkipperStrange 2019-05-05 19:51:47
Any of them
RdotDev 2019-05-05 19:55:24
SkipperStrange 2019-05-05 19:39:20
This is all the js loaded in the blade template needed for the upload

You need to push these tags before closing body.
For example if your blade file extend with app.blade.php. then you need to push using
Add @stack(‘scripts’) in your app.blade.php
Then add below code in your page.blade.php after @endsection

@push(‘scripts’)
Put your required script files for this page
<script src=””…… Tags here
@endpush

SkipperStrange 2019-05-05 20:08:45
Hmm
|