How do i set background image height and width in css?

|
devink0430 2020-08-07 18:05:56
your vux actions get function code?
devink0430 2020-08-07 18:07:41
did you use fetch or axios ?

Using the Fetch API – Web APIs | MDNdeveloper.mozilla.org
The Fetch API provides a JavaScript interface for accessing and manipulating parts of the HTTP pipeline, such as requests and responses. It also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.
Cleo_hacker 2020-08-07 18:09:28
devink0430 2020-08-07 18:05:56
your vux actions get function code?

you mean get method?

devink0430 2020-08-07 18:09:54
ya
devink0430 2020-08-07 18:11:14
like this
actions: {
get ({ commit }, {url, id}) {
return fetch(…)
}
}
Cleo_hacker 2020-08-07 18:11:51
devink0430 2020-08-07 18:11:14
like this
actions: {
get ({ commit }, {url, id}) {
return fetch(…)
}
}

yeah

devink0430 2020-08-07 18:14:15
like this?
fetch(`${url}/${id}`)
Cleo_hacker 2020-08-07 18:14:49
okay okay
devink0430 2020-08-07 18:24:08
fetch(`${url}/${id}`).then(response => {console.log(response);})
devink0430 2020-08-07 18:24:34
.catch((error) => {
console.error(‘Error:’, error);
});
Cleo_hacker 2020-08-07 18:26:48
devink0430 2020-08-07 18:24:08
fetch(`${url}/${id}`).then(response => {console.log(response);})

Thanks let me try it

devink0430 2020-08-07 18:26:59
in your chrome console show anything ?
Cleo_hacker 2020-08-07 18:36:25
laravel_discuss-47315.jpg

Cleo_hacker 2020-08-07 18:37:04
laravel_discuss-47316.jpg

Cleo_hacker 2020-08-07 18:38:54
laravel_discuss-47317.jpg

smartnathan2020 2020-08-07 19:28:06
Unknownuser009 2020-08-07 14:33:00
Anyone have simple project for inventory system( include crud operation, invoicing,stock report).if anyone have llz send me link

I do

Unknownuser009 2020-08-07 19:56:04
smartnathan2020 2020-08-07 19:28:06
I do

Will u please share

smartnathan2020 2020-08-07 19:58:43
Unknownuser009 2020-08-07 19:56:04
Will u please share

Source code?

Unknownuser009 2020-08-07 19:59:25
Yes
smartnathan2020 2020-08-07 20:03:11
Unknownuser009 2020-08-07 19:59:25
Yes

It’s in a private repo. And currently in production. Dm me your email address

Unknownuser009 2020-08-07 20:19:25
Ok
Unknownuser009 2020-08-07 20:19:42
smartnathan2020 2020-08-07 20:03:11
It’s in a private repo. And currently in production. Dm me your email address

Tempuser0705@gmail.com

shaildark 2020-08-07 20:19:44
How do i set background image height and width in css?
devink0430 2020-08-07 20:29:31
shaildark 2020-08-07 20:19:44
How do i set background image height and width in css?

background-size:

shaildark 2020-08-07 22:21:59
If i don’t set background image using css then the page doesn’t have any horizontal scroll but if i use background image using css then there is horizontal scroll even if i use background-size css to set the size
Sujay 2020-08-07 22:37:28
Hi all, in vuejs

Component1.vue

method: {
myMethod() {
//Code
}
}

Component2.vue

method: {
method2() {
//how to call myMethod() which is in component1
}
}

Manish_Rajora 2020-08-07 23:58:19
cccr85 2020-08-07 13:00:41
Cron?

No not a cron job I am using laravel queue
My laravel version is 5.7
This issue happen for some user at that time only normally it’s working fine

Manish_Rajora 2020-08-08 00:07:12
2020-08-07 13:42:53
2 hours is way too big time delay πŸ˜…πŸ’”

2 hr delay for last mail but first mail shoot after 7 hr

Can’t understand why all mail shoot at same time.

Manish_Rajora 2020-08-08 00:09:28
data_zxcv 2020-08-05 16:29:17
Hi All
we are looking for an experienced Laravel(PHP) developers for Mohali Chandigarh Location. Interested candidates can reach me
Thanks

Hello Pm me

oxbir 2020-08-08 00:52:46
How to add slug to href?
oxbir 2020-08-08 00:54:01
Look at my codes, I want to save the information, then everything falls apart.

I have three tables, houses & categories & category_house.

houses & category_house tables

public function up()
{
Schema::create(‘houses’, function (Blueprint $table) {
$table->bigIncrements(‘id’);
$table->bigInteger(‘user_id’)->unsigned();
$table->foreign(‘user_id’)->references(‘id’)->on(‘users’)->onDelete(‘cascade’);
$table->string(‘title’);
$table->string(‘slug’);
$table->string(‘lang’);
$table->string(‘image’)->nullable();
$table->text(‘sliders’);
$table->text(‘body’);
$table->timestamps();
});
Schema::create(‘category_house’, function (Blueprint $table) {
$table->bigInteger(‘category_id’)->unsigned();
$table->foreign(‘category_id’)->references(‘id’)->on(‘categories’)->onDelete(‘cascade’);
$table->bigInteger(‘house_id’)->unsigned();
$table->foreign(‘house_id’)->references(‘id’)->on(‘houses’)->onDelete(‘cascade’);
$table->primary([‘category_id’ , ‘house_id’]);
});
}

categories table

public function up()
{
Schema::create(‘categories’, function (Blueprint $table) {
$table->bigIncrements(‘id’);
$table->string(‘name’);
$table->string(‘lang’);
$table->string(‘href’)->nullable();
$table->integer(‘parent_id’);
$table->string(‘icon’)->nullable();
$table->timestamps();
});
}

edit.blade.php

<form action=”{{ route(‘houses.update’, $house->id) }}” method=”post”>
@csrf
@method(‘PUT’)
<input type=”hidden” name=”sliders”>
<div class=”col-md-6″>
<div class=”form-group”>
<label for=”title”>Title</label>
<input type=”text” class=”form-control” id=”title” name=”title” value=”{{ old(‘title’) ?? $house->title }}”>
</div>
</div>
<div class=”col-md-12″>
<div class=”form-group”>
<label for=”body”>Body</label>
<textarea class=”form-control” id=”body” name=”body”>{{ old(‘body’) ?? $house->body }}</textarea>
</div>
</div>
<div class=”col-md-6″>
<div class=”form-group”>
<label for=”category”>Sub Category</label>
<select name=”category” id=”category” class=”form-control”>
@foreach($categories as $category)
<option value=”{{ $category->id }}” {{ $house->categories()->pluck(‘id’)->contains($category->id) ? ‘selected’ : ” }}>
{{ $category->name }}
</option>
@endforeach
</select>
</div>
</div>
<div class=”col-md-6″>
<div class=”form-group”>
<label for=”lang”>Language</label>
<select id=”lang” name=”lang” class=”form-control”>
<option value=”fa” {{ $house->lang == ‘fa’ ? ‘selected’ : ” }}>Farsi</option>
<option value=”en” {{ $house->lang == ‘en’ ? ‘selected’ : ” }}>English</option>
</select>
</div>
</div>
//…..
<div class=”form-group”>
<button class=”btn btn-primary btn-lg btn-block”>
<i class=”fas fa-check ml-2″></i>Save
</button>
</div>
</form>

HouseController.php

public function update(Request $request, House $house)
{
$house->user_id = 1;
$house->title = $request->title;
$house->lang = $request->lang;
$house->body = $request->body;
if($request->has(‘image’)) {
$image = $request->file(‘image’);
$filename = $image->getClientOriginalName();
$image->move(public_path(‘images/slideShows’), $filename);
$house->image = $request->file(‘image’)->getClientOriginalName();

oxbir 2020-08-08 00:54:10
}
$house->save();
$house->categories()->sync($request->category);
$category = Category::findOrFail($request->get(‘category’))->getParent();
$category->name = $request->title;
$category->parent_id = $request->category;
$category->lang = $request->lang;
$category->href = $request->slug;
$category->save();
return redirect()->route(‘houses.index’);
}

Category.php

public function getParent ()
{
return $this->hasOne(Category::class, ‘id’, ‘parent_id’)->withDefault([‘name’ => ‘-‘]);
}

For example, I have the following cateories in database.

id`—-`name`—————–`lang`——`href`———`parent_id`——–`icon`—————–`created_at`——–`updated_at
8`—–`Main Menu`——–`en`———-`NULL`——`0`———————`fas fa-cube`——`NULL`—————-`NULL

The correct method should be stored this way

id`—-`name`—————–`lang`——`href`———————-`parent_id`——–`icon`—————–`created_at`——–`updated_at
8`—–`Main Menu`——–`en`———-`NULL`——————-`0`———————`fas fa-cube`——`NULL`—————-`NULL
20`—`Duplex House`—-`en`———-`duplex-house`——`8`———————`NULL`—————`NULL`—————-`NULL

But this way it is saved.

id`—-`name`—————–`lang`——`href`———————-`parent_id`——–`icon`—————–`created_at`——–`updated_at
8`—–`Duplex House`—-`en`———`NULL`——————-`8`———————`fas fa-cube`——`NULL`—————-`NULL
20`—`Duplex House`—-`en`———`NULL`——————-`8`———————`NULL`—————`NULL`—————-`NULL

And when I changed this code

$category = Category::findOrFail($request->get(‘category’))->getParent();

I want to add slug to href.

– slug => house
– href => categories

Lynda Lyn 2020-08-08 01:04:24
Please when i try authenticate in laravel voyager i have this error auth: failed someone can help me?
2020-08-08 02:21:09
oxbir 2020-08-08 00:54:10
}
$house->save();
$house->categories()->sync($request->category);
$category = Category::findOrFail($request->get(‘category’))->getParent();
$category->name = $request->title;
$category->parent_id = $request->category;
$category->lang = $request->lang;
$category->href = $request->slug;
$category->save();
return redirect()->route(‘houses.index’);
}

Category.php

public function getParent ()
{
return $this->hasOne(Category::class, ‘id’, ‘parent_id’)->withDefault([‘name’ => ‘-‘]);
}

For example, I have the following cateories in database.

id`—-`name`—————–`lang`——`href`———`parent_id`——–`icon`—————–`created_at`——–`updated_at
8`—–`Main Menu`——–`en`———-`NULL`——`0`———————`fas fa-cube`——`NULL`—————-`NULL

The correct method should be stored this way

id`—-`name`—————–`lang`——`href`———————-`parent_id`——–`icon`—————–`created_at`——–`updated_at
8`—–`Main Menu`——–`en`———-`NULL`——————-`0`———————`fas fa-cube`——`NULL`—————-`NULL
20`—`Duplex House`—-`en`———-`duplex-house`——`8`———————`NULL`—————`NULL`—————-`NULL

But this way it is saved.

id`—-`name`—————–`lang`——`href`———————-`parent_id`——–`icon`—————–`created_at`——–`updated_at
8`—–`Duplex House`—-`en`———`NULL`——————-`8`———————`fas fa-cube`——`NULL`—————-`NULL
20`—`Duplex House`—-`en`———`NULL`——————-`8`———————`NULL`—————`NULL`—————-`NULL

And when I changed this code

$category = Category::findOrFail($request->get(‘category’))->getParent();

I want to add slug to href.

– slug => house
– href => categories

Can you send the code as a screenshots ?
I can’t read well πŸ™„

2020-08-08 02:23:44
Send update function
I think this is what we are interested at πŸ™„πŸ™πŸ»
2020-08-08 02:28:19
Not sure but

In the blade you are sending the house id as a parameter

And in update function you are updating the house

{you passed the id not the house}

Solution:

1) Change update function to:

public function update(Request $request, $id)

2) Add this line at the beginning of the update function

$house = House::find($id);

AxistechZMB 2020-08-08 03:52:59
laravel_discuss-47343.jpg

AxistechZMB 2020-08-08 03:54:06
I’m getting an error on line 21
AxistechZMB 2020-08-08 03:54:36
laravel_discuss-47345.jpg

AxistechZMB 2020-08-08 03:55:35
laravel_discuss-47346.jpg

isofdev 2020-08-08 04:15:15
AxistechZMB 2020-08-08 03:54:36

Your problem is $sections not exist

isofdev 2020-08-08 04:15:47
AxistechZMB 2020-08-08 03:55:35

Show controller code

AxistechZMB 2020-08-08 04:16:18
laravel_discuss-47350.jpg
Controller code
luisdavidgd 2020-08-08 04:39:18
Oh, but you are not sending the variable to view
luisdavidgd 2020-08-08 04:40:05
AxistechZMB 2020-08-08 04:16:18
Controller code

Should be

return view(‘vendorsDb.sections.sections’, [
‘sections’ => $sections,
]);

AxistechZMB 2020-08-08 04:46:30
luisdavidgd 2020-08-08 04:40:05
Should be

return view(‘vendorsDb.sections.sections’, [
‘sections’ => $sections,
]);

Thank you it has worked 😁😁

punchpanda 2020-08-08 07:07:39
who know about laravel deplopy server ?
punchpanda 2020-08-08 07:08:10
how to set config ?
oxbir 2020-08-08 07:52:38
2020-08-08 02:21:09
Can you send the code as a screenshots ?
I can’t read well πŸ™„

laravel_discuss-47359.jpg

oxbir 2020-08-08 07:56:20
oxbir 2020-08-08 07:52:38

laravel_discuss-47360.jpg

|