6amMart - Multivendor Food, Grocery, eCommerce, Parcel, Pharmacy delivery app with Admin & Website

6amMart - Multivendor Food, Grocery, eCommerce, Parcel, Pharmacy delivery app with Admin & Website v1.5.1 Untouched

No permission to download
  • You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

  • You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

gsmm

New member
May 12, 2022
13
0
1
i get his error.how to solve
 

Attachments

  • Screenshot 2022-07-03 at 21-50-34 https __monywashop.tk.png
    Screenshot 2022-07-03 at 21-50-34 https __monywashop.tk.png
    19.8 KB · Views: 12

gsmm

New member
May 12, 2022
13
0
1
hi there i try to install this script but on IMPORT DATABASE option when i press button import database i get (
Check your database permission! ) for all other websites i have have any issue for database only for this i try on 2 VPS with centos and ubuntu but i cant install

Can you guys please help me/ Guide me where im missing something ? Thanks
same error anyone help
 

johnc

Active member
Feb 18, 2021
181
83
28
check you have SSL of web admin or not. Also check you have / at the end of URL in the app coding as well.
 
Last edited:
  • Like
Reactions: gischa

solobrands

Member
Trusted Uploader
Aug 20, 2019
13
33
13
Can anyone give some guidance on the building of the Web App, I am trying to build it using Android Studio (flutter) following their instructions on the website but at the stage
Code:
You don't have permission to view the code content. Log in or register now.
the result is:

Code:
You don't have permission to view the code content. Log in or register now.

Has anyone run into this when trying to build ? I've tried updating the environment as some googling said will fix it but that doesn't seem to work.
RESOLVED - Switched to stable channel and downgraded flutter version to 3.0.0, not sure why newer flutter version was incompatible but was my dev environment was the problem. Built all 3 Apps (and hosted on server working as intended).
 
Last edited:

Akhadjon

New member
Jun 4, 2022
15
1
3
Uzbekistan
I have problem with it i cant register in app I faced "Connection to API Server failed due to internet connection" but i have high speed internet connection. second time to click register it says email and number already registered

Who can help me?
 

leonardoisrael20

New member
Mar 23, 2021
4
5
3
I have problem with it i cant register in app I faced "Connection to API Server failed due to internet connection" but i have high speed internet connection. second time to click register it says email and number already registered

Who can help me?
Go to app > http > controllers > api > v1 > auth > CustomerAuthController.php and change it with the following code:

<?php

namespace App\Http\Controllers\Api\V1\Auth;

use App\CentralLogics\Helpers;
use App\CentralLogics\SMS_module;
use App\Http\Controllers\Controller;
use App\Mail\EmailVerification;
use App\Models\BusinessSetting;
use App\Models\EmailVerifications;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;

class CustomerAuthController extends Controller
{
public function verify_phone(Request $request)
{
$validator = Validator::make($request->all(), [
'phone' => 'required|min:11|max:14',
'otp'=>'required',
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}
$user = User::where('phone', $request->phone)->first();
if($user)
{
if($user->is_phone_verified)
{
return response()->json([
'message' => trans('messages.phone_number_is_already_varified')
], 200);

}

if(env('APP_MODE')=='demo')
{
if($request['otp']=="1234")
{
$user->is_phone_verified = 1;
$user->save();

return response()->json([
'message' => trans('messages.phone_number_varified_successfully'),
'otp' => 'inactive'
], 200);
}
return response()->json([
'message' => trans('messages.phone_number_and_otp_not_matched')
], 404);
}

$data = DB::table('phone_verifications')->where([
'phone' => $request['phone'],
'token' => $request['otp'],
])->first();

if($data)
{
DB::table('phone_verifications')->where([
'phone' => $request['phone'],
'token' => $request['otp'],
])->delete();

$user->is_phone_verified = 1;
$user->save();

return response()->json([
'message' => trans('messages.phone_number_varified_successfully'),
'otp' => 'inactive'
], 200);
}
else{
return response()->json([
'message' => trans('messages.phone_number_and_otp_not_matched')
], 404);
}
}
return response()->json([
'message' => trans('messages.not_found')
], 404);

}

public function check_email(Request $request)
{
$validator = Validator::make($request->all(), [
'email' => 'required|unique:users'
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}


if (BusinessSetting::where(['key'=>'email_verification'])->first()->value){
$token = rand(1000, 9999);
DB::table('email_verifications')->insert([
'email' => $request['email'],
'token' => $token,
'created_at' => now(),
'updated_at' => now(),
]);
Mail::to($request['email'])->send(new EmailVerification($token));

return response()->json([
'message' => 'Email is ready to register',
'token' => 'active'
], 200);
}else{
return response()->json([
'message' => 'Email is ready to register',
'token' => 'inactive'
], 200);
}
}

public function verify_email(Request $request)
{
$validator = Validator::make($request->all(), [
'email' => 'required'
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}

$verify = EmailVerifications::where(['email' => $request['email'], 'token' => $request['token']])->first();

if (isset($verify)) {
$verify->delete();
return response()->json([
'message' => trans('messages.token_varified'),
], 200);
}

$errors = [];
array_push($errors, ['code' => 'token', 'message' => trans('messages.token_not_found')]);
return response()->json(['errors' => $errors ]
, 404);
}

public function register(Request $request)
{
$validator = Validator::make($request->all(), [
'f_name' => 'required',
'l_name' => 'required',
'email' => 'required|unique:users',
'phone' => 'required|unique:users',
'password' => 'required|min:6',
], [
'f_name.required' => 'The first name field is required.',
'l_name.required' => 'The last name field is required.',
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}
$customer_verification = BusinessSetting::where('key','customer_verification')->first()->value;
$user = User::create([
'f_name' => $request->f_name,
'l_name' => $request->l_name,
'email' => $request->email,
'phone' => $request->phone,
'password' => bcrypt($request->password),
]);

$token = $user->createToken('RestaurantCustomerAuth')->accessToken;

if($customer_verification && env('APP_MODE') !='demo')
{
$otp = rand(1000, 9999);
DB::table('phone_verifications')->updateOrInsert(['phone' => $request['phone']],
[
'token' => $otp,
'created_at' => now(),
'updated_at' => now(),
]);
// Mail::to($request['email'])->send(new EmailVerification($otp));
$response = SMS_module::send($request['phone'],$otp);
if($response != 'success')
{
$errors = [];
array_push($errors, ['code' => 'otp', 'message' => trans('messages.faield_to_send_sms')]);
return response()->json([
'errors' => $errors
], 405);
}
}
return response()->json(['token' => $token,'is_phone_verified' => 0, 'phone_verify_end_url'=>"api/v1/auth/verify-phone" ], 200);
}

public function login(Request $request)
{
$validator = Validator::make($request->all(), [
'phone' => 'required',
'password' => 'required|min:6'
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}

$data = [
'phone' => $request->phone,
'password' => $request->password
];
$customer_verification = BusinessSetting::where('key','customer_verification')->first()->value;
if (auth()->attempt($data)) {
$token = auth()->user()->createToken('RestaurantCustomerAuth')->accessToken;
if(!auth()->user()->status)
{
$errors = [];
array_push($errors, ['code' => 'auth-003', 'message' => trans('messages.your_account_is_blocked')]);
return response()->json([
'errors' => $errors
], 403);
}
if($customer_verification && !auth()->user()->is_phone_verified && env('APP_MODE') != 'demo')
{
$otp = rand(1000, 9999);
DB::table('phone_verifications')->updateOrInsert(['phone' => $request['phone']],
[
'token' => $otp,
'created_at' => now(),
'updated_at' => now(),
]);
$response = SMS_module::send($request['phone'],$otp);
if($response != 'success')
{

$errors = [];
array_push($errors, ['code' => 'otp', 'message' => trans('messages.faield_to_send_sms')]);
return response()->json([
'errors' => $errors
], 405);
}
}

return response()->json(['token' => $token, 'is_phone_verified'=>auth()->user()->is_phone_verified], 200);
} else {
$errors = [];
array_push($errors, ['code' => 'auth-001', 'message' => trans('messages.Unauthorized')]);
return response()->json([
'errors' => $errors
], 401);
}
}
}
 

Akhadjon

New member
Jun 4, 2022
15
1
3
Uzbekistan
Go to app > http > controllers > api > v1 > auth > CustomerAuthController.php and change it with the following code:

<?php

namespace App\Http\Controllers\Api\V1\Auth;

use App\CentralLogics\Helpers;
use App\CentralLogics\SMS_module;
use App\Http\Controllers\Controller;
use App\Mail\EmailVerification;
use App\Models\BusinessSetting;
use App\Models\EmailVerifications;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;

class CustomerAuthController extends Controller
{
public function verify_phone(Request $request)
{
$validator = Validator::make($request->all(), [
'phone' => 'required|min:11|max:14',
'otp'=>'required',
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}
$user = User::where('phone', $request->phone)->first();
if($user)
{
if($user->is_phone_verified)
{
return response()->json([
'message' => trans('messages.phone_number_is_already_varified')
], 200);

}

if(env('APP_MODE')=='demo')
{
if($request['otp']=="1234")
{
$user->is_phone_verified = 1;
$user->save();

return response()->json([
'message' => trans('messages.phone_number_varified_successfully'),
'otp' => 'inactive'
], 200);
}
return response()->json([
'message' => trans('messages.phone_number_and_otp_not_matched')
], 404);
}

$data = DB::table('phone_verifications')->where([
'phone' => $request['phone'],
'token' => $request['otp'],
])->first();

if($data)
{
DB::table('phone_verifications')->where([
'phone' => $request['phone'],
'token' => $request['otp'],
])->delete();

$user->is_phone_verified = 1;
$user->save();

return response()->json([
'message' => trans('messages.phone_number_varified_successfully'),
'otp' => 'inactive'
], 200);
}
else{
return response()->json([
'message' => trans('messages.phone_number_and_otp_not_matched')
], 404);
}
}
return response()->json([
'message' => trans('messages.not_found')
], 404);

}

public function check_email(Request $request)
{
$validator = Validator::make($request->all(), [
'email' => 'required|unique:users'
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}


if (BusinessSetting::where(['key'=>'email_verification'])->first()->value){
$token = rand(1000, 9999);
DB::table('email_verifications')->insert([
'email' => $request['email'],
'token' => $token,
'created_at' => now(),
'updated_at' => now(),
]);
Mail::to($request['email'])->send(new EmailVerification($token));

return response()->json([
'message' => 'Email is ready to register',
'token' => 'active'
], 200);
}else{
return response()->json([
'message' => 'Email is ready to register',
'token' => 'inactive'
], 200);
}
}

public function verify_email(Request $request)
{
$validator = Validator::make($request->all(), [
'email' => 'required'
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}

$verify = EmailVerifications::where(['email' => $request['email'], 'token' => $request['token']])->first();

if (isset($verify)) {
$verify->delete();
return response()->json([
'message' => trans('messages.token_varified'),
], 200);
}

$errors = [];
array_push($errors, ['code' => 'token', 'message' => trans('messages.token_not_found')]);
return response()->json(['errors' => $errors ]
, 404);
}

public function register(Request $request)
{
$validator = Validator::make($request->all(), [
'f_name' => 'required',
'l_name' => 'required',
'email' => 'required|unique:users',
'phone' => 'required|unique:users',
'password' => 'required|min:6',
], [
'f_name.required' => 'The first name field is required.',
'l_name.required' => 'The last name field is required.',
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}
$customer_verification = BusinessSetting::where('key','customer_verification')->first()->value;
$user = User::create([
'f_name' => $request->f_name,
'l_name' => $request->l_name,
'email' => $request->email,
'phone' => $request->phone,
'password' => bcrypt($request->password),
]);

$token = $user->createToken('RestaurantCustomerAuth')->accessToken;

if($customer_verification && env('APP_MODE') !='demo')
{
$otp = rand(1000, 9999);
DB::table('phone_verifications')->updateOrInsert(['phone' => $request['phone']],
[
'token' => $otp,
'created_at' => now(),
'updated_at' => now(),
]);
// Mail::to($request['email'])->send(new EmailVerification($otp));
$response = SMS_module::send($request['phone'],$otp);
if($response != 'success')
{
$errors = [];
array_push($errors, ['code' => 'otp', 'message' => trans('messages.faield_to_send_sms')]);
return response()->json([
'errors' => $errors
], 405);
}
}
return response()->json(['token' => $token,'is_phone_verified' => 0, 'phone_verify_end_url'=>"api/v1/auth/verify-phone" ], 200);
}

public function login(Request $request)
{
$validator = Validator::make($request->all(), [
'phone' => 'required',
'password' => 'required|min:6'
]);

if ($validator->fails()) {
return response()->json(['errors' => Helpers::error_processor($validator)], 403);
}

$data = [
'phone' => $request->phone,
'password' => $request->password
];
$customer_verification = BusinessSetting::where('key','customer_verification')->first()->value;
if (auth()->attempt($data)) {
$token = auth()->user()->createToken('RestaurantCustomerAuth')->accessToken;
if(!auth()->user()->status)
{
$errors = [];
array_push($errors, ['code' => 'auth-003', 'message' => trans('messages.your_account_is_blocked')]);
return response()->json([
'errors' => $errors
], 403);
}
if($customer_verification && !auth()->user()->is_phone_verified && env('APP_MODE') != 'demo')
{
$otp = rand(1000, 9999);
DB::table('phone_verifications')->updateOrInsert(['phone' => $request['phone']],
[
'token' => $otp,
'created_at' => now(),
'updated_at' => now(),
]);
$response = SMS_module::send($request['phone'],$otp);
if($response != 'success')
{

$errors = [];
array_push($errors, ['code' => 'otp', 'message' => trans('messages.faield_to_send_sms')]);
return response()->json([
'errors' => $errors
], 405);
}
}

return response()->json(['token' => $token, 'is_phone_verified'=>auth()->user()->is_phone_verified], 200);
} else {
$errors = [];
array_push($errors, ['code' => 'auth-001', 'message' => trans('messages.Unauthorized')]);
return response()->json([
'errors' => $errors
], 401);
}
}
}
Thanks bro my app is working :)
 
AdBlock Detected

Hi bro. Can you please help us?

I know the ads sometimes are too annoying and you want to use Adblock. But I think you can support us by adding Babiato to the whitelist. It will help us and our community.

Thanks for your help!

I've Disabled AdBlock