Member Since 1 Year Ago
GujarKhan
3,880 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Earned once your experience points ranks in the top 10 of all Laracasts users.
Replied to 505 Error
@paulmaxos i have written the same 5.8 there as well. should i replace composer.json same as you mentioned here in 5.8 version or its
"fideloper/proxy": "^4.4.1"
Replied to Error 505 Internal Server Error
i had tried what you suggested but i got error their as well regarding TrustedProxy.php file line 66
Replied to 505 Error
i have tried this but i got error in terminal
in TrustedProxy.php file line 66
Undefined class constant 'HEADER_CLIENT_IP'
Started a new Conversation Error 505 Internal Server Error
I am hosting my laravel 5.8 project. but i am facing this error in error_log file.
Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv_strpos() in /home/sellca6/carauction.sellcarsuae.com/vendor/symfony/polyfill-mbstring/Mbstring.php:490
Replied to 505 Error
@paulmaxos this is my error_log file
Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv_strpos() in /home/sellca6/carauction.sellcarsuae.com/vendor/symfony/polyfill-mbstring/Mbstring.php:490
Replied to 505 Error
@paulmaxos this is my laravel.log file
F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Routing\Router.php(635): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request)) #46 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Routing\Router.php(601): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route)) #47 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Routing\Router.php(590): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #48 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(176): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #49 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request)) #50 F:\xampp\htdocs\amazing-hrm-payroll\vendor\fideloper\proxy\src\TrustProxies.php(56): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #51 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure)) #52 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #53 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #54 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure)) #55 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #56 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(30): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #57 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure)) #58 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #59 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #60 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure)) #61 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #62 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #63 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(149): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure)) #64 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #65 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #66 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #67 F:\xampp\htdocs\amazing-hrm-payroll\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #68 F:\xampp\htdocs\amazing-hrm-payroll\index.php(55): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #69 {main} "}
Started a new Conversation 505 Error
I have hosted my project. It is working on root url like carauction.sellcarsuae.com but when i want access any other route its giving me 505 error
I am trying to get messages from table 'message' on certain conditions. there are two type of users client and worker, client request a specific worker and by default request_status = 0. When admin approve the request from client status is updated to 1. In msg portal of client only name of those worker can be seen for whom client requested and admin approved that request. This is how i am trying to bind it with message table where message is unread. Anyone who can help me out.
$abc = DB::select("requests.client_id, requests.worker_id , count(is_read) as unread
from requests LEFT JOIN message ON requests.client_id = message.from and is_read = 0 and message.to =
" . Auth::id() . "
where requests.request_status = " . 1 . "
group by requests.client_id , requests.worker_id");
Replied to 419 (unknown Status) In Jquery "3.4.1".
@bugsysha $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } });
Here i am adding CSRF token
Started a new Conversation 419 (unknown Status) In Jquery "3.4.1".
I am creating a live chat using ajax call in Laravel 5.8 and i am getting 419(unknown status) error in console. When I write any thing in input area and press enter key and console it above mmentioned error appears in console box and nothing else happens. Here is my code.
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$('.user').click(function () {
$('.user').removeClass('active');
$(this).addClass('active');
$(this).find('.pending').remove();
receiver_id = $(this).attr('id');
$.ajax({
type: "get",
url: "message/" + receiver_id, // need to create this route
data: "",
cache: false,
success: function (data) {
$('#messages').html(data);
scrollToBottomFunc();
}
});
});
$(document).on('keyup', '.input-text input', function (e) {
var message = $(this).val();
// check if enter key is pressed and message is not null also receiver is selected
if (e.keyCode == 13 && message != '' && receiver_id != '') {
$(this).val(''); // while pressed enter text box will be empty
var datastr = "receiver_id=" + receiver_id + "&message=" + message;
$.ajax({
type: "post",
url: "message", // need to create this post route
data: datastr,
cache: false,
success: function (data) {
},
error: function (jqXHR, status, err) {
},
complete: function () {
scrollToBottomFunc();
}
})
}
});
});
and controller
public function sendMessage(Request $request)
{
if($request->ajax()){
$from = Auth::id();
$to = $request->receiver_id;
$message = $request->message;
$data = new Message();
$data->from = $from;
$data->to = $to;
$data->message = $message;
$data->is_read = 0; // message will be unread when sending message
$data->save();
}
}
Started a new Conversation How To Concatenate In Laravel.
I am trying to concatenate invoice number with prefix 'CN2020/' in where clause. In database i have stored like 'CN2020/0065'. Just want to fetch this thing. While $number is in 4 digits
use App\Transaction;
$number = $receipt_details->invoice_no;
$sell_return = Transaction::where('invoice_no','CN2020/'.$number)->first();
Replied to How To Sync Local Mysql Database And Live Server Database And Vice Versa Using Laravel?
I couldn't find any solution for this problem yet and left that project and made sure that user use portable device for internet. If you find any solution do share.
Replied to Storing Date On Request In Created At Entity.
@snapey Sir by using your code it is storing the correct date but if I enter any date before today like 3rd-Aug-2020 instead of providing date after 30 days like next due installment date is 3rd-Sept-2020 it is giving me 25th-Sept-2020 and so on.
Started a new Conversation Storing Date On Request In Created At Entity.
Actually I have Installment management system. system is working perfectly but now i want that when i sell my product i can use any desired date and system automatically generate installments dates in advance. What system is actually doing is getting todays date from carbon and then adding installment difference. below is my code.
$instalment = Instalment::findOrFail($request->instalment_id);
$parIns = round($order->due_amount / $instalment->time);
$tt = '';
for ($i=1;$i<=$instalment->time;$i++){
$insTime['order_instalment_id'] = $orderInss->id;
$insTime['amount'] = $parIns;
$insTime['amount'] = $parIns;
$tt = Carbon::parse($tt)->addDays($instalment->difference);
$insTime['pay_date'] = $tt;
InstalmentTime::create($insTime);
}