• 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"

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

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

No permission to download
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: 18
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
 
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
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:
"flutter build web --web-renderer html --release"
the result is:

Code:
Target dart2js failed: Exception: Warning: The 'dart2js' entrypoint script is deprecated, please use 'dart compile js' instead.
.dart_tool/flutter_build/8db5bf253f210f11db79e9b4dda98f7b/web_plugin_registrant.dart:25:38:
Error: Null safety features are disabled for this library.
void registerPlugins([final Registrar? pluginRegistrar]) {
                                     ^
Error: A library can't opt out of null safety by default, when using sound null safety.
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

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:
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?
 
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);
}
}
}
 
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

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock