mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fixes for file upload on dedicated routes
This commit is contained in:
parent
181902fece
commit
4612379811
@ -556,7 +556,7 @@ class ProjectController extends BaseController
|
||||
* ),
|
||||
* )
|
||||
*/
|
||||
public function upload(UploadProjectRequest $request, Product $project)
|
||||
public function upload(UploadProjectRequest $request, Project $project)
|
||||
{
|
||||
|
||||
if ($request->has('documents'))
|
||||
|
@ -67,6 +67,10 @@ class Project extends BaseModel
|
||||
return $this->morphMany(Document::class, 'documentable');
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class)->withTrashed();
|
||||
}
|
||||
// /**
|
||||
// * @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
// */
|
||||
|
@ -99,4 +99,9 @@ class Vendor extends BaseModel
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class)->withTrashed();
|
||||
}
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
||||
|
||||
Route::resource('projects', 'ProjectController'); // name = (projects. index / create / show / update / destroy / edit
|
||||
Route::post('projects/bulk', 'ProjectController@bulk')->name('projects.bulk');
|
||||
Route::put('projects/{project}/upload', 'ProjectController@upload')->name('projects.upload');
|
||||
|
||||
Route::resource('quotes', 'QuoteController'); // name = (quotes. index / create / show / update / destroy / edit
|
||||
Route::get('quotes/{quote}/{action}', 'QuoteController@action')->name('quotes.action');
|
||||
|
Loading…
Reference in New Issue
Block a user