from server

This commit is contained in:
root 2023-08-03 17:09:16 +05:00
parent 18128a285a
commit 6d19fdd55e
4 changed files with 34 additions and 2 deletions

View File

@ -512,7 +512,7 @@ class ProductsAPIController extends Controller
public function myProducts()
{
dd("sdf");
//dd("sdf");
$perPage = intval(input('custom_per_page')); // intval protects from injection
try {

View File

@ -55,10 +55,12 @@ Route::group(['prefix' =>'api/v1','namespace' =>'AhmadFatoni\ApiGenerator\Contro
->where('id', '[0-9]+');
Route::get('my-products','ProductsApiController@customerProducts');
Route::get('my-products','ProductsApiController@myProducts');
Route::get('my-products/{id}','ProductsApiController@showMyProductById');
Route::delete('my-products/{id}', 'ProductsApiController@delete')
->where('id', '[0-9]+');
Route::resource('messages', 'MessagesapiController', ['except' => ['destroy', 'create', 'edit']]);
Route::get('messages/chatroom/{id}', 'MessagesapiController@enterChatroom')
->where('id', '[0-9]+');

View File

@ -0,0 +1,27 @@
<?php namespace TPS\Birzha\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateTpsBirzhaMessages2 extends Migration
{
public function up()
{
Schema::create('tps_birzha_messages', function($table)
{
$table->engine = 'InnoDB';
$table->bigIncrements('id')->unsigned();
$table->integer('sender_id');
$table->integer('reciver_id');
$table->dateTime('send_at');
$table->dateTime('read_at')->nullable();
$table->text('message');
$table->timestamp('deleted_at')->nullable();
});
}
public function down()
{
Schema::dropIfExists('tps_birzha_messages');
}
}

View File

@ -386,3 +386,6 @@
1.0.135:
- 'Updated table tps_birzha_comments'
- builder_table_update_tps_birzha_comments_3.php
1.0.136:
- 'Created table tps_birzha_messages'
- builder_table_create_tps_birzha_messages_2.php